empty struct.h:
touch src/struct.h
+If you are missing some headers or if some headers are incorrect
+(if_vlan.h and if_bonding.h on RHEL 2.1 for example), you can copy
+some more current version (for example from Debian Lenny or from
+Fedora) in some directory like "extra-headers/":
+ - ./extra-headers/linux/if_vlan.h
+ - ./extra-headers/linux/if_bonding.h
+Then, configure like this:
+ ./configure CFLAGS="-Wall -I${PWD}/extra-headers"
+This has been tested with RHEL 2.1.
+
lldpd uses privilege separation to increase its security. Two
processes, one running as root and doing minimal stuff and the other
running as an unprivileged user into a chroot doing most of the stuff,
AC_CHECK_HEADERS([ \
linux/wireless.h \
linux/if_bonding.h \
- linux/if_vlan.h \
linux/if_bridge.h \
linux/if_packet.h \
],,AC_MSG_ERROR([Required header missing.]),[
],,AC_MSG_ERROR([Required header missing.]),[
@%:@include <linux/types.h>
])
+AC_CHECK_HEADERS([ \
+ linux/if_vlan.h \
+],,AC_MSG_ERROR([You should get linux/if_vlan.h from some other place. See README file.]),[
+@%:@include <arpa/inet.h>
+@%:@include <linux/if.h>
+])
AC_CACHE_SAVE
SLIST_EMPTY \
],[],[],[[@%:@include <sys/queue.h>]])
+# On some systems, some ioctl are not declared
+AC_CHECK_DECLS([ \
+SIOCGIFVLAN, \
+SIOCBONDINFOQUERY, \
+SIOCBONDSLAVEINFOQUERY \
+],[],[],[[@%:@include <linux/sockios.h>]])
+AC_CHECK_MEMBERS([ifslave.slave_name, ifbond.num_slaves], [],
+ [AC_MSG_ERROR([linux/if_bonding.h is incomplete. See README file.])],
+ [
+@%:@include <arpa/inet.h>
+@%:@include <linux/if.h>
+@%:@include <linux/if_bonding.h>
+])
+
# Do we have PACKET_ORIGDEV (it can be present at runtime, put it in compat.h)
AC_CHECK_DECLS([PACKET_ORIGDEV],[],[],[[@%:@include <linux/if_packet.h>]])
#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
#endif
+#if !HAVE_SIOCGIFVLAN
+#define SIOCGIFVLAN 0x8982
+#endif
+
+#if !HAVE_SIOCBONDINFOQUERY
+#define SIOCBONDINFOQUERY 0x8994
+#endif
+
+#if !HAVE_SIOCBONDSLAVEINFOQUERY
+#define SIOCBONDSLAVEINFOQUERY 0x8993
+#endif
+
#if !HAVE_DECL_SPEED_10000
#define SPEED_10000 10000
#endif