Fix USE_KERNEL_HEADERS build with compat-wireless

compat-wireless does not include linux/compiler.h to define __user, so
define it in hostapd code before including linux/wireless.h.
This commit is contained in:
Jouni Malinen 2008-06-03 11:57:52 +03:00
parent 7e1488494e
commit 957ed801e9
2 changed files with 10 additions and 0 deletions

View File

@ -16,6 +16,11 @@
#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 */

View File

@ -19,6 +19,11 @@
#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 */