summaryrefslogtreecommitdiff
path: root/fad-getad.c
diff options
context:
space:
mode:
Diffstat (limited to 'fad-getad.c')
-rw-r--r--fad-getad.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fad-getad.c b/fad-getad.c
index 831ddae7aa8d5..742ae1facb17f 100644
--- a/fad-getad.c
+++ b/fad-getad.c
@@ -61,15 +61,21 @@ static const char rcsid[] _U_ =
#endif
#ifdef AF_PACKET
+# ifdef HAVE_NETPACKET_PACKET_H
+/* Solaris 11 and later, Linux distributions with newer glibc */
+# include <netpacket/packet.h>
+# else /* HAVE_NETPACKET_PACKET_H */
+/* LynxOS, Linux distributions with older glibc */
# ifdef __Lynx__
/* LynxOS */
# include <netpacket/if_packet.h>
-# else
+# else /* __Lynx__ */
/* Linux */
# include <linux/types.h>
# include <linux/if_packet.h>
-# endif
-#endif
+# endif /* __Lynx__ */
+# endif /* HAVE_NETPACKET_PACKET_H */
+#endif /* AF_PACKET */
/*
* This is fun.