diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/platform.h | 8 | ||||
-rw-r--r-- | src/nat/gnunet-helper-nat-client.c | 5 | ||||
-rw-r--r-- | src/nse/gnunet-service-nse.c | 2 | ||||
-rw-r--r-- | src/testbed/gnunet-service-testbed_cpustatus.c | 2 | ||||
-rw-r--r-- | src/util/disk.c | 2 |
5 files changed, 10 insertions, 9 deletions
diff --git a/src/include/platform.h b/src/include/platform.h index 0dddd9741..976c9eac7 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -115,11 +115,10 @@ | |||
115 | #include <time.h> | 115 | #include <time.h> |
116 | #endif | 116 | #endif |
117 | #endif | 117 | #endif |
118 | 118 | #ifdef BSD | |
119 | #ifdef SOMEBSD | ||
120 | #include <net/if.h> | 119 | #include <net/if.h> |
121 | #endif | 120 | #endif |
122 | #ifdef FREEBSD | 121 | #if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__) |
123 | #include <semaphore.h> | 122 | #include <semaphore.h> |
124 | #endif | 123 | #endif |
125 | #ifdef DARWIN | 124 | #ifdef DARWIN |
@@ -188,7 +187,8 @@ | |||
188 | 187 | ||
189 | #include <sys/mman.h> | 188 | #include <sys/mman.h> |
190 | 189 | ||
191 | #ifdef FREEBSD | 190 | /* FreeBSD_kernel is not defined on the now discontinued kFreeBSD */ |
191 | #if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__) | ||
192 | #define __BYTE_ORDER BYTE_ORDER | 192 | #define __BYTE_ORDER BYTE_ORDER |
193 | #define __BIG_ENDIAN BIG_ENDIAN | 193 | #define __BIG_ENDIAN BIG_ENDIAN |
194 | #endif | 194 | #endif |
diff --git a/src/nat/gnunet-helper-nat-client.c b/src/nat/gnunet-helper-nat-client.c index 12abfd2df..0271d6e0f 100644 --- a/src/nat/gnunet-helper-nat-client.c +++ b/src/nat/gnunet-helper-nat-client.c | |||
@@ -249,7 +249,8 @@ send_icmp_udp (const struct in_addr *my_ip, const struct in_addr *other) | |||
249 | off = 0; | 249 | off = 0; |
250 | ip_pkt.vers_ihl = 0x45; | 250 | ip_pkt.vers_ihl = 0x45; |
251 | ip_pkt.tos = 0; | 251 | ip_pkt.tos = 0; |
252 | #ifdef FREEBSD | 252 | /* should this be BSD only? */ |
253 | #if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__) | ||
253 | ip_pkt.pkt_len = sizeof(packet); /* Workaround PR kern/21737 */ | 254 | ip_pkt.pkt_len = sizeof(packet); /* Workaround PR kern/21737 */ |
254 | #else | 255 | #else |
255 | ip_pkt.pkt_len = htons (sizeof(packet)); | 256 | ip_pkt.pkt_len = htons (sizeof(packet)); |
@@ -360,7 +361,7 @@ send_icmp (const struct in_addr *my_ip, const struct in_addr *other) | |||
360 | off = 0; | 361 | off = 0; |
361 | ip_pkt.vers_ihl = 0x45; | 362 | ip_pkt.vers_ihl = 0x45; |
362 | ip_pkt.tos = 0; | 363 | ip_pkt.tos = 0; |
363 | #ifdef FREEBSD | 364 | #if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__) |
364 | ip_pkt.pkt_len = sizeof(packet); /* Workaround PR kern/21737 */ | 365 | ip_pkt.pkt_len = sizeof(packet); /* Workaround PR kern/21737 */ |
365 | #else | 366 | #else |
366 | ip_pkt.pkt_len = htons (sizeof(packet)); | 367 | ip_pkt.pkt_len = htons (sizeof(packet)); |
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index e31b07d14..d16abed71 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c | |||
@@ -75,7 +75,7 @@ | |||
75 | (GNUNET_MQ_PRIO_BACKGROUND | GNUNET_MQ_PREF_UNRELIABLE \ | 75 | (GNUNET_MQ_PRIO_BACKGROUND | GNUNET_MQ_PREF_UNRELIABLE \ |
76 | | GNUNET_MQ_PREF_CORK_ALLOWED) | 76 | | GNUNET_MQ_PREF_CORK_ALLOWED) |
77 | 77 | ||
78 | #if FREEBSD | 78 | #if BSD |
79 | #define log2(a) (log (a) / log (2)) | 79 | #define log2(a) (log (a) / log (2)) |
80 | #endif | 80 | #endif |
81 | 81 | ||
diff --git a/src/testbed/gnunet-service-testbed_cpustatus.c b/src/testbed/gnunet-service-testbed_cpustatus.c index f38b9aee6..5eaeaf952 100644 --- a/src/testbed/gnunet-service-testbed_cpustatus.c +++ b/src/testbed/gnunet-service-testbed_cpustatus.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #include <kvm.h> | 43 | #include <kvm.h> |
44 | #endif | 44 | #endif |
45 | #endif | 45 | #endif |
46 | #if SOMEBSD | 46 | #if BSD |
47 | #if HAVE_KVM_H | 47 | #if HAVE_KVM_H |
48 | #include <kvm.h> | 48 | #include <kvm.h> |
49 | #endif | 49 | #endif |
diff --git a/src/util/disk.c b/src/util/disk.c index 47a0ed5c9..866dbc301 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -1505,7 +1505,7 @@ GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h) | |||
1505 | return GNUNET_SYSERR; | 1505 | return GNUNET_SYSERR; |
1506 | } | 1506 | } |
1507 | 1507 | ||
1508 | #if defined(FREEBSD) || defined(OPENBSD) || defined(DARWIN) | 1508 | #if ! defined(LINUX) || ! defined(GNU) |
1509 | return fsync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK; | 1509 | return fsync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK; |
1510 | #else | 1510 | #else |
1511 | return fdatasync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK; | 1511 | return fdatasync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK; |