Getting the definition of the structure is system-dependent :(
For now, use Linux header unconditionally.
Signed-off-by: Eugene Crosser <evgenii.cherkashin@profitbricks.com>
-CFLAGS = -pthread -Wall -I../include
+# -D_GNU_SOURCE needed for `struct in6_pktinfo` to be defined in linux/ipv6.h
+CFLAGS = -pthread -Wall -I../include -D_GNU_SOURCE
ARFLAGS = rcsv
LIB = libpsmb.a
#include "psmb_priv.h"
#include "hash64.h"
-/* #include <linux/ipv6.h> // should give us this definition */
+#include <linux/ipv6.h> /* contains definition of `struct in6_pktinfo`, */
+ /* but only if _GNU_SOURCE is defined. Arrgh! */
+/* The structure itself *should* be like this:
struct in6_pktinfo {
struct in6_addr ipi6_addr;
int ipi6_ifindex;
};
+*/
static void dummy_log(void *log_priv, int priority, const char *format, ...) {}