summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2012-03-30 15:58:43 +0200
committerAnand Avati <avati@redhat.com>2012-04-23 21:29:03 -0700
commit7313b22f10fafe7773a15d8306496d1d56ef5f81 (patch)
tree5080fcb607bbea24938444ef2eb5a031fee54793
parent92baa61bfe5853fca301eb1e10f063097df24e2e (diff)
NetBSD build fixes
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Change-Id: I8f9aabeadd2f842521a82e59594115bd80155d68 BUG: 2923 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3053 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--cli/src/cli-cmd-volume.c2
-rw-r--r--configure.ac10
-rw-r--r--libglusterfs/src/run.c1
-rw-r--r--rpc/rpc-lib/src/xdr-common.h1
-rw-r--r--rpc/xdr/src/xdr-nfs3.c1
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c3
-rwxr-xr-xxlators/mount/fuse/utils/mount_glusterfs.in3
-rw-r--r--xlators/storage/posix/src/posix-handle.c2
8 files changed, 20 insertions, 3 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index ea7a13761..4773ac9f4 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -1460,11 +1460,13 @@ cli_get_detail_status (dict_t *dict, int i, cli_volume_status_t *status)
if (!status->total)
goto out;
+#ifdef GF_LINUX_HOST_OS
memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "brick%d.device", i);
ret = dict_get_str (dict, key, &(status->device));
if (ret)
status->device = NULL;
+#endif
memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "brick%d.block_size", i);
diff --git a/configure.ac b/configure.ac
index ef3e122aa..36e9f08f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -394,6 +394,11 @@ dnl Linux, Solaris, Cygwin
AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec])
dnl FreeBSD, NetBSD
AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec])
+case $host_os in
+ *netbsd*)
+ CFLAGS=-D_INCOMPLETE_XOPEN_C063
+ ;;
+esac
AC_CHECK_FUNC([linkat], [have_linkat=yes])
if test "x${have_linkat}" = "xyes"; then
AC_DEFINE(HAVE_LINKAT, 1, [define if found linkat])
@@ -474,8 +479,9 @@ case $host_os in
if test "x$ac_cv_header_execinfo_h" = "xyes"; then
GF_GLUSTERFS_LDFLAGS="-lexecinfo"
fi
- GF_FUSE_LDADD="-liconv -lperfuse"
- BUILD_FUSE_CLIENT=no
+ GF_FUSE_LDADD="-lperfuse"
+ BUILD_FUSE_CLIENT=yes
+ LEXLIB=""
;;
*bsd*)
GF_HOST_OS="GF_BSD_HOST_OS"
diff --git a/libglusterfs/src/run.c b/libglusterfs/src/run.c
index f6f193143..846675054 100644
--- a/libglusterfs/src/run.c
+++ b/libglusterfs/src/run.c
@@ -30,6 +30,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <assert.h>
+#include <signal.h>
#include <sys/wait.h>
#include <sys/resource.h>
diff --git a/rpc/rpc-lib/src/xdr-common.h b/rpc/rpc-lib/src/xdr-common.h
index d5198d20f..610e0f79b 100644
--- a/rpc/rpc-lib/src/xdr-common.h
+++ b/rpc/rpc-lib/src/xdr-common.h
@@ -56,6 +56,7 @@ enum gf_dump_procnum {
#define xdr_u_quad_t xdr_u_int64_t
#define xdr_quad_t xdr_int64_t
#define xdr_uint32_t xdr_u_int32_t
+#define xdr_uint64_t xdr_u_int64_t
#endif
diff --git a/rpc/xdr/src/xdr-nfs3.c b/rpc/xdr/src/xdr-nfs3.c
index 2b2b1049c..35fca59ff 100644
--- a/rpc/xdr/src/xdr-nfs3.c
+++ b/rpc/xdr/src/xdr-nfs3.c
@@ -19,6 +19,7 @@
#include "xdr-nfs3.h"
#include "mem-pool.h"
+#include "xdr-common.h"
#if GF_DARWIN_HOST_OS
#define xdr_u_quad_t xdr_u_int64_t
diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c
index fbff1e39a..feec23998 100644
--- a/xlators/mount/fuse/src/fuse-helpers.c
+++ b/xlators/mount/fuse/src/fuse-helpers.c
@@ -24,6 +24,9 @@
#include <sys/sysctl.h>
#endif
+#ifndef GF_REQUEST_MAXGROUPS
+#define GF_REQUEST_MAXGROUPS 16
+#endif /* GF_REQUEST_MAXGROUPS */
static void
fuse_resolve_wipe (fuse_resolve_t *resolve)
diff --git a/xlators/mount/fuse/utils/mount_glusterfs.in b/xlators/mount/fuse/utils/mount_glusterfs.in
index 3d4d28620..b12b4e04e 100755
--- a/xlators/mount/fuse/utils/mount_glusterfs.in
+++ b/xlators/mount/fuse/utils/mount_glusterfs.in
@@ -85,7 +85,7 @@ start_glusterfs ()
--volfile-server-transport=$transport");
else
cmd_line=$(echo "$cmd_line \
---volfile-server=$server_ip \
+--volfile-server=$server_ip");
fi
else
cmd_line=$(echo "$cmd_line --volfile=$volfile_loc");
@@ -173,6 +173,7 @@ main ()
[ -r "$volfile_loc" ] || {
server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:.\-]*\):.*/\1/p');
+ volume_id=$(echo "$volfile_loc" | sed -n 's/[a-zA-Z0-9:.\-]*:\(.*\)/\1/p');
volfile_loc="";
}
# following line is product of love towards sed
diff --git a/xlators/storage/posix/src/posix-handle.c b/xlators/storage/posix/src/posix-handle.c
index 9b6df445e..38b28edc3 100644
--- a/xlators/storage/posix/src/posix-handle.c
+++ b/xlators/storage/posix/src/posix-handle.c
@@ -27,7 +27,9 @@
#include <sys/stat.h>
#include <unistd.h>
#include <libgen.h>
+#ifdef GF_LINUX_HOST_OS
#include <alloca.h>
+#endif
#include "posix-handle.h"
#include "posix.h"