]> git.proxmox.com Git - mirror_kronosnet.git/commitdiff
[access lists] fix build on freebsd
authorFabio M. Di Nitto <fdinitto@redhat.com>
Sun, 17 Feb 2019 08:49:06 +0000 (09:49 +0100)
committerFabio M. Di Nitto <fdinitto@redhat.com>
Thu, 9 May 2019 13:36:42 +0000 (15:36 +0200)
don't use malloc.h, obsoleted by stdlib.h
define s6_addr32 that's only available in kernel space

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
libknet/links_acl.c
libknet/tests/int_links_acl.c

index 2ad3e90ea84c37dabdc93e339db2e78578625d0f..854f273d9996d1046744a91c8518659b5815874f 100644 (file)
 #include <netinet/in.h>
 #include <stdint.h>
 #include <string.h>
-#include <malloc.h>
+#include <stdlib.h>
 
 #include "internals.h"
 #include "logging.h"
 #include "transports.h"
 #include "links_acl.h"
 
+/*
+ * s6_addr32 is not defined in BSD userland, only kernel.
+ * definition is the same as linux and it works fine for
+ * what we need.
+ */
+#ifndef s6_addr32
+#define s6_addr32 __u6_addr.__u6_addr32
+#endif
+
 /*
  * IPv4 See if the address we have matches the current match entry
  */
index 129aabe9d1c8bf041e5e214e6a705f31d6e56207..133cd5aa41fbcc2d00fc31407aaac8188e206b0b 100644 (file)
@@ -13,7 +13,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <netdb.h>
-#include <malloc.h>
 
 #include "internals.h"
 #include "links_acl.h"