summaryrefslogtreecommitdiff
path: root/net-mgmt/gnu-ipcalc/files/patch-netsplit.c
blob: c31403d6336f66b12bea5a0b050d2facaa2cbe5d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- netsplit.c.orig	2021-06-06 18:56:02 UTC
+++ netsplit.c
@@ -32,9 +32,19 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <stdint.h>
+#include <sys/socket.h>
 
 #include "ipv6.h"
 #include "ipcalc.h"
+
+#if defined(__FreeBSD__) || defined(__darwin__) || defined(__APPLE__)
+#ifndef s6_addr16
+#define s6_addr16 __u6_addr.__u6_addr16
+#endif
+#ifndef s6_addr32
+#define s6_addr32 __u6_addr.__u6_addr32
+#endif
+#endif
 
 static const char *numtoquad(uint32_t num)
 {