Fix USE_KERNEL_HEADERS build with compat-wireless
authorJouni Malinen <j@w1.fi>
Tue, 3 Jun 2008 08:57:52 +0000 (11:57 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 3 Jun 2008 08:57:52 +0000 (11:57 +0300)
compat-wireless does not include linux/compiler.h to define __user, so
define it in hostapd code before including linux/wireless.h.

hostapd/driver_hostap.c
hostapd/driver_prism54.c

index c97f2ec..013e631 100644 (file)
 #include <sys/ioctl.h>
 
 #ifdef USE_KERNEL_HEADERS
+/* compat-wireless does not include linux/compiler.h to define __user, so
+ * define it here */
+#ifndef __user
+#define __user
+#endif /* __user */
 #include <asm/types.h>
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>   /* The L2 protocols */
index be16e44..f119875 100644 (file)
 #include <sys/select.h>
 
 #ifdef USE_KERNEL_HEADERS
+/* compat-wireless does not include linux/compiler.h to define __user, so
+ * define it here */
+#ifndef __user
+#define __user
+#endif /* __user */
 #include <asm/types.h>
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>   /* The L2 protocols */