--- a/packet.h +++ b/packet.h @@ -18,6 +18,11 @@ #ifndef _NET_BATMAN_ADV_PACKET_H_ #define _NET_BATMAN_ADV_PACKET_H_
+#ifdef __KERNEL__ +#include <linux/bitops.h> +#include <uapi/linux/if_ether.h> +#endif /* __KERNEL__ */
/**
- enum batadv_packettype - types for batman-adv encapsulated packets
- @BATADV_IV_OGM: originator messages for B.A.T.M.A.N. IV
Ok, so you are including linux/bitops.h for BIT(...) and uapi/linux/if_ether.h for ETH_ALEN? You are missing:
* linux/types.h for uint8_t, __be16 and so on * define for the bitfield byteorder comes from asm/byteorder.h
Most of these files are part of linux-libc-dev. The rest requires some kind of hack. A way to still work in the batctl build would be to include dummy files. An example patch is attached. This builds at least on my Debian system and my OpenWrt build environment.
Kind regards, Sven