@@ -, +, @@ --- support/include/junction.h | 2 +- support/junction/junction.c | 4 ++++ support/junction/locations.c | 2 +- support/junction/nfs.c | 4 ++++ support/junction/path.c | 8 +++++++- 5 files changed, 17 insertions(+), 3 deletions(-) --- a/support/include/junction.h +++ a/support/include/junction.h @@ -125,7 +125,7 @@ void nfs_free_location(struct nfs_fsloc *location); void nfs_free_locations(struct nfs_fsloc *locations); struct nfs_fsloc *nfs_new_location(void); -__attribute_malloc__ +__attribute__((__malloc__)) char **nfs_dup_string_array(char **array); void nfs_free_string_array(char **array); --- a/support/junction/junction.c +++ a/support/junction/junction.c @@ -27,6 +27,10 @@ #include #endif +#ifndef ALLPERMS +#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) +#endif + #include #include --- a/support/junction/locations.c +++ a/support/junction/locations.c @@ -63,7 +63,7 @@ nfs_free_string_array(char **array) * * Caller must free the returned array with nfs_free_string_array() */ -__attribute_malloc__ char ** +__attribute__((__malloc__)) char ** nfs_dup_string_array(char **array) { unsigned int size, i; --- a/support/junction/nfs.c +++ a/support/junction/nfs.c @@ -68,6 +68,10 @@ * directory's mode bits are restored from this information. */ +#ifndef ALLPERMS +#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) +#endif + #include #include --- a/support/junction/path.c +++ a/support/junction/path.c @@ -23,6 +23,12 @@ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt */ +#include + +#ifdef HAVE_LIMITS_H +#include +#endif + #include #include @@ -99,7 +105,7 @@ nsdb_alloc_zero_component_pathname(char ***path_array) * Remove multiple sequential slashes and any trailing slashes, * but leave "/" by itself alone. */ -static __attribute_malloc__ char * +__attribute__((__malloc__)) char * nsdb_normalize_path(const char *pathname) { size_t i, j, len; --