aboutsummaryrefslogtreecommitdiffstats
path: root/pcap-usb-linux.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-11-25 14:06:01 -0800
committerGuy Harris <guy@alum.mit.edu>2010-11-25 14:06:01 -0800
commitb019cc06cb4fdc01f99a36581fe7b55e2533d663 (patch)
tree0be086f3b9a9fee0ded0e7c1191a635a05c34144 /pcap-usb-linux.c
parent0920898be2ede72baafa2a02e77ea223ecbe4f9a (diff)
Check whether we have <linux/compiler.h>.
Not all distributions have it in /usr/include; I guess the ones that don't have it have versions of other kernel headers that don't require it.
Diffstat (limited to 'pcap-usb-linux.c')
-rw-r--r--pcap-usb-linux.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pcap-usb-linux.c b/pcap-usb-linux.c
index 61695b6..f1b430c 100644
--- a/pcap-usb-linux.c
+++ b/pcap-usb-linux.c
@@ -62,12 +62,14 @@ static const char rcsid[] _U_ =
#include <sys/mman.h>
#ifdef HAVE_LINUX_USBDEVICE_FS_H
/*
- * We assume that any Linux that supports USB sniffing has <linux/compiler.h>;
- * we might need it for <linux/usbdevice_fs.h> to define __user.
+ * We might need <linux/compiler.h> to define __user for
+ * <linux/usbdevice_fs.h>.
*/
+#ifdef HAVE_LINUX_COMPILER_H
#include <linux/compiler.h>
+#endif /* HAVE_LINUX_COMPILER_H */
#include <linux/usbdevice_fs.h>
-#endif
+#endif /* HAVE_LINUX_USBDEVICE_FS_H */
#define USB_IFACE "usbmon"
#define USB_TEXT_DIR_OLD "/sys/kernel/debug/usbmon"