aboutsummaryrefslogtreecommitdiff
path: root/src/nat/gnunet-helper-nat-client.c
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-11-19 17:30:32 +0000
committerng0 <ng0@n0.is>2019-11-19 17:30:32 +0000
commit7c14b80a011e9e99b1cef0bfd96bae364edd5663 (patch)
tree9b4d0714c179b434117aad6fe6a65bc023ba04f9 /src/nat/gnunet-helper-nat-client.c
parent1b296cf77a90930e29bd60c0aef70b8efbb1bd24 (diff)
downloadgnunet-7c14b80a011e9e99b1cef0bfd96bae364edd5663.tar.gz
gnunet-7c14b80a011e9e99b1cef0bfd96bae364edd5663.zip
On *BSD the header file sys/param.h defines BSD. Drop unnecessary
BSD defines in the build-system. Furthermore add detection for FreeBSD using the additional defines by FreeBSD. Use !Linux where previously a list of BSDs was.
Diffstat (limited to 'src/nat/gnunet-helper-nat-client.c')
-rw-r--r--src/nat/gnunet-helper-nat-client.c5
1 files changed, 3 insertions, 2 deletions
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));