diff options
-rw-r--r-- | api/src/glfs.h | 9 | ||||
-rw-r--r-- | cli/src/cli-cmd-volume.c | 1 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | contrib/qemu/util/hbitmap.c | 2 | ||||
-rw-r--r-- | rpc/rpc-lib/src/xdr-common.h | 2 |
5 files changed, 16 insertions, 2 deletions
diff --git a/api/src/glfs.h b/api/src/glfs.h index 964422aab72..41907240dd7 100644 --- a/api/src/glfs.h +++ b/api/src/glfs.h @@ -42,6 +42,15 @@ #include <dirent.h> #include <sys/statvfs.h> +/* Portability non glibc c++ build systems */ +#ifndef __THROW +# if defined __cplusplus +# define __THROW throw () +# else +# define __THROW +# endif +#endif + __BEGIN_DECLS /* The filesystem object. One object per 'virtual mount' */ diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 80b559dc69f..822da7d4e48 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -16,6 +16,7 @@ #include <sys/socket.h> #include <netdb.h> #include <sys/types.h> +#include <sys/wait.h> #include <netinet/in.h> #ifndef _CONFIG_H diff --git a/configure.ac b/configure.ac index 06bd7a661a3..462aa5420c1 100644 --- a/configure.ac +++ b/configure.ac @@ -601,7 +601,7 @@ dnl FreeBSD, NetBSD AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec]) case $host_os in *netbsd*) - CFLAGS="${CFLAGS} -D_INCOMPLETE_XOPEN_C063" + CFLAGS="${CFLAGS} -D_INCOMPLETE_XOPEN_C063 -DCONFIG_MACHINE_BSWAP_H" ;; esac AC_CHECK_FUNC([linkat], [have_linkat=yes]) @@ -776,6 +776,8 @@ AC_CHECK_LIB([readline -lcurses],[readline],[RLLIBS="-lreadline -lcurses"]) AC_CHECK_LIB([readline -ltermcap],[readline],[RLLIBS="-lreadline -ltermcap"]) AC_CHECK_LIB([readline -lncurses],[readline],[RLLIBS="-lreadline -lncurses"]) +AC_CHECK_LIB([intl], [gettext]) + if test "x$RLLIBS" != "x"; then AC_DEFINE(HAVE_READLINE, 1, [readline enabled CLI]) BUILD_READLINE=yes diff --git a/contrib/qemu/util/hbitmap.c b/contrib/qemu/util/hbitmap.c index d93683128bd..f2f1c1934a3 100644 --- a/contrib/qemu/util/hbitmap.c +++ b/contrib/qemu/util/hbitmap.c @@ -92,10 +92,12 @@ struct HBitmap { unsigned long *levels[HBITMAP_LEVELS]; }; +#ifndef __NetBSD__ static inline int popcountl(unsigned long l) { return BITS_PER_LONG == 32 ? ctpop32(l) : ctpop64(l); } +#endif /* __NetBSD__ */ /* Advance hbi to the next nonzero word and return it. hbi->pos * is updated. Returns zero if we reach the end of the bitmap. diff --git a/rpc/rpc-lib/src/xdr-common.h b/rpc/rpc-lib/src/xdr-common.h index f221192adbe..07da6835ac4 100644 --- a/rpc/rpc-lib/src/xdr-common.h +++ b/rpc/rpc-lib/src/xdr-common.h @@ -18,8 +18,8 @@ #include <rpc/types.h> #include <sys/types.h> -#include <rpc/auth.h> #include <rpc/xdr.h> +#include <rpc/auth.h> #include <sys/uio.h> #ifdef __NetBSD__ |