summaryrefslogtreecommitdiff
path: root/filesystems/glusterfs/patches/patch-bh
blob: 19471cc6356a1d5f99c8df2d5861d087224309b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
$NetBSD: patch-bh,v 1.1 2011/04/18 16:19:48 manu Exp $

NetBSD's <dirent.h> does a #defiine d_ino d_fileno. Since glusterfs 
declares structs with d_ino members, we must include <dirent.h> early
so that d_ino get preprocessed into d_fileno conssitently.

Also define proper xdr types for NetBSD.
--- rpc/rpc-lib/src/xdr-common.h.orig	2011-04-13 10:41:50.000000000 +0200
+++ rpc/rpc-lib/src/xdr-common.h	2011-04-13 10:47:57.000000000 +0200
@@ -29,8 +29,12 @@
 #include <sys/types.h>
 #include <rpc/xdr.h>
 #include <sys/uio.h>
 
+#ifdef __NetBSD__
+#include <dirent.h>
+#endif /* __NetBSD__ */
+
 enum gf_dump_procnum {
         GF_DUMP_NULL,
         GF_DUMP_DUMP,
         GF_DUMP_MAXVALUE,
@@ -46,8 +50,15 @@
 #define xdr_uint32_t xdr_u_int32_t
 #define uint64_t u_int64_t
 #endif
 
+#if defined(__NetBSD__)
+#define xdr_u_quad_t xdr_u_int64_t
+#define xdr_quad_t   xdr_int64_t
+#define xdr_uint32_t xdr_u_int32_t
+#endif
+
+
 #if GF_SOLARIS_HOST_OS
 #define u_quad_t uint64_t
 #define quad_t int64_t
 #define xdr_u_quad_t xdr_uint64_t