aboutsummaryrefslogtreecommitdiff
path: root/fad-getad.c
diff options
context:
space:
mode:
authorDarren Reed <darren.reed@oracle.com>2011-06-04 10:50:30 -0700
committerGuy Harris <guy@alum.mit.edu>2011-06-04 10:50:30 -0700
commitaf68d6452bf6855666ceef7694138e8c4b39623a (patch)
tree4d8ddd09fef7ffb56b7bd15f8ec6bba4b9a52be9 /fad-getad.c
parent1332e38a469e8f1f31c4b2a38a41a7fd42330b3b (diff)
Handle Solaris 11, which has AF_PACKET but not (all?) linux/*.h includes.
This set of diffs is required to correct a problem when compiling libpcap on Solaris 11 due to the assumption that the presence of AF_PACKET implies certain header files are in certain positions. The failure (without the patch) is demonstrated as follows: gcc -O2 -fpic -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./fad-getad.c ./fad-getad.c:69:27: linux/types.h: No such file or directory ./fad-getad.c:70:31: linux/if_packet.h: No such file or directory Reviewed-By: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'fad-getad.c')
-rw-r--r--fad-getad.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fad-getad.c b/fad-getad.c
index 831ddae7..02351511 100644
--- a/fad-getad.c
+++ b/fad-getad.c
@@ -61,12 +61,16 @@ static const char rcsid[] _U_ =
#endif
#ifdef AF_PACKET
-# ifdef __Lynx__
-/* LynxOS */
+# ifdef HAVE_NETPACKET_PACKET_H
+# include <netpacket/packet.h>
+# endif
+# ifdef HAVE_NETPACKET_IF_PACKET_H
# include <netpacket/if_packet.h>
-# else
-/* Linux */
+# endif
+# ifdef HAVE_LINUX_TYPES_H
# include <linux/types.h>
+# endif
+# ifdef HAVE_LINUX_IF_PACKET_H
# include <linux/if_packet.h>
# endif
#endif