summaryrefslogtreecommitdiff
path: root/filesystems/glusterfs/patches/patch-ab
blob: 33fa81c4193eb882ff47a2a6ad60975ef09650f7 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
$NetBSD: patch-ab,v 1.3 2011/05/19 14:54:23 manu Exp $

NetBSD does not have AI_ADDRCONFIG. This patch has a side effect: glusterfsd
listens on IPv6 adresses only by default. Option transport.socket.bind-address 
in volume server-tcp must be used to listen on an IPv4 address.

--- rpc/rpc-lib/src/rpc-transport.h.orig	2011-04-22 19:37:28.000000000 +0200
+++ rpc/rpc-lib/src/rpc-transport.h	2011-05-19 12:31:33.000000000 +0200
@@ -39,8 +39,12 @@
 #ifndef MAX_IOVEC
 #define MAX_IOVEC 16
 #endif
 
+#ifndef AI_ADDRCONFIG
+#define AI_ADDRCONFIG 0
+#endif /* AI_ADDRCONFIG */
+
 /* Given the 4-byte fragment header, returns non-zero if this fragment
  * is the last fragment for the RPC record being assemebled.
  * RPC Record marking standard defines a 32 bit value as the fragment
  * header with the MSB signifying whether the fragment is the last
--- xlators/nfs/lib/src/rpc-socket.c.orig	2011-04-22 19:37:28.000000000 +0200
+++ xlators/nfs/lib/src/rpc-socket.c	2011-05-19 12:31:33.000000000 +0200
@@ -36,8 +36,12 @@
 #include <netdb.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 
+#ifndef AI_ADDRCONFIG
+#define AI_ADDRCONFIG 0
+#endif /* AI_ADDRCONFIG */
+
 static int
 nfs_rpcsvc_socket_server_get_local_socket (int addrfam, char *listenhost,
                                            uint16_t listenport,
                                            struct sockaddr *addr,
--- libglusterfs/src/common-utils.c.orig	2011-05-19 14:59:16.000000000 +0200
+++ libglusterfs/src/common-utils.c	2011-05-19 15:00:05.000000000 +0200
@@ -48,8 +48,12 @@
 #include "stack.h"
 #include "globals.h"
 #include "md5.h"
 
+#ifndef AI_ADDRCONFIG
+#define AI_ADDRCONFIG 0
+#endif /* AI_ADDRCONFIG */
+
 typedef int32_t (*rw_op_t)(int32_t fd, char *buf, int32_t size);
 typedef int32_t (*rwv_op_t)(int32_t fd, const struct iovec *buf, int32_t size);
 
 struct dnscache6 {