diff -r 750919688b61 tools/xenstore/talloc.c --- a/tools/xenstore/talloc.c Mon Jul 14 13:26:45 2008 +0100 +++ b/tools/xenstore/talloc.c Mon Jul 14 14:52:30 2008 +0200 @@ -500,7 +500,7 @@ void *talloc_init(const char *fmt, ...) should probably not be used in new code. It's in here to keep the talloc code consistent across Samba 3 and 4. */ -void talloc_free_children(void *ptr) +static void talloc_free_children(void *ptr) { struct talloc_chunk *tc; diff -r 750919688b61 tools/xenstore/tdb.c --- a/tools/xenstore/tdb.c Mon Jul 14 13:26:45 2008 +0100 +++ b/tools/xenstore/tdb.c Mon Jul 14 14:52:30 2008 +0200 @@ -28,7 +28,7 @@ #ifndef _SAMBA_BUILD_ -#if HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H #include #endif @@ -731,7 +731,7 @@ static int expand_file(TDB_CONTEXT *tdb, static int expand_file(TDB_CONTEXT *tdb, tdb_off size, tdb_off addition) { char buf[1024]; -#if HAVE_FTRUNCATE_EXTEND +#ifdef HAVE_FTRUNCATE_EXTEND if (ftruncate(tdb->fd, size+addition) != 0) { TDB_LOG((tdb, 0, "expand_file ftruncate to %d failed (%s)\n", size+addition, strerror(errno))); diff -r 750919688b61 tools/xenstore/xenstore_client.c --- a/tools/xenstore/xenstore_client.c Mon Jul 14 13:26:45 2008 +0100 +++ b/tools/xenstore/xenstore_client.c Mon Jul 14 14:52:30 2008 +0200 @@ -121,7 +121,7 @@ static int show_whole_path = 0; #define MIN(a, b) (((a) < (b))? (a) : (b)) -void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms) +static void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms) { static struct expanding_buffer ebuf; char **e; diff -r 750919688b61 tools/xenstore/xenstored_core.c --- a/tools/xenstore/xenstored_core.c Mon Jul 14 13:26:45 2008 +0100 +++ b/tools/xenstore/xenstored_core.c Mon Jul 14 14:52:30 2008 +0200 @@ -347,23 +347,6 @@ static int destroy_fd(void *_fd) int *fd = _fd; close(*fd); return 0; -} - -/* Return a pointer to an fd, self-closing and attached to this pathname. */ -int *talloc_open(const char *pathname, int flags, int mode) -{ - int *fd; - - fd = talloc(pathname, int); - *fd = open(pathname, flags, mode); - if (*fd < 0) { - int saved_errno = errno; - talloc_free(fd); - errno = saved_errno; - return NULL; - } - talloc_set_destructor(fd, destroy_fd); - return fd; } /* Is child a subnode of parent, or equal? */