From c5d7fa2bf4c766200971cfbb877d4a25b3cb32b0 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Fri, 12 Aug 2011 06:46:15 +0200 Subject: Build fix for NetBSD Change-Id: Icb0163d61bfbd3bad520c06a655f80ec05fc3fb2 BUG: 2923 Reviewed-on: http://review.gluster.com/214 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/compat.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h index a7e5e73b1..cb71d32ce 100644 --- a/libglusterfs/src/compat.h +++ b/libglusterfs/src/compat.h @@ -58,7 +58,7 @@ #endif /* GF_LINUX_HOST_OS */ #ifdef GF_BSD_HOST_OS -/* In case of FreeBSD */ +/* In case of FreeBSD and NetBSD */ #define UNIX_PATH_MAX 104 #include @@ -66,16 +66,21 @@ #include #include #include +#ifdef HAVE_SYS_XATTR_H +#include +#endif /* HAVE_SYS_XATTR_H */ #include #include +#ifndef XATTR_CREATE enum { ATTR_CREATE = 1, #define XATTR_CREATE ATTR_CREATE ATTR_REPLACE = 2 #define XATTR_REPLACE ATTR_REPLACE }; +#endif /* XATTR_CREATE */ #ifndef sighandler_t @@ -111,6 +116,13 @@ enum { #define F_SETLK64 F_SETLK #define F_SETLKW64 F_SETLKW +#ifdef __NetBSD__ +char *basename_r(const char *); +char *dirname_r(char *); + +#define basename(path) basename_r(path) +#define dirname(path) dirname_r(path) +#endif /* __NetBSD__ */ #endif /* GF_BSD_HOST_OS */ #ifdef GF_DARWIN_HOST_OS -- cgit