-rw-r--r-- | libopie2/opienet/onetwork.cpp | 3 | ||||
-rw-r--r-- | libopie2/opienet/onetwork.h | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp index 25c70e0..998b50e 100644 --- a/libopie2/opienet/onetwork.cpp +++ b/libopie2/opienet/onetwork.cpp @@ -51,6 +51,7 @@ #include <sys/socket.h> #include <sys/types.h> #include <unistd.h> +#include <linux/sockios.h> #include <linux/wireless.h> using namespace std; @@ -725,7 +726,7 @@ void OHostAPMonitoringInterface::setEnabled( bool b ) _if->_iwr.u.mode = IW_MODE_MONITOR; _if->wioctl( SIOCSIWMODE ); #else - int* args = (int*) &_if._iwr.u.name; + int* args = (int*) &_if->_iwr.u.name; args[0] = 2; args[1] = 0; _if->wioctl( SIOCDEVPRIVATE ); diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h index 936ac85..56da5f4 100644 --- a/libopie2/opienet/onetwork.h +++ b/libopie2/opienet/onetwork.h @@ -48,10 +48,18 @@ // ML: Yeah, I hate to include kernel headers, but it's necessary here // ML: Recent RedHat and MandrakePatches to the Kernel and WE broke something // ML: #include <net/if.h> e.g. conflicts with #include <linux/wireless.h> + +#ifndef IFNAMSIZ #define IFNAMSIZ 16 +#endif + #include <linux/wireless.h> #include <net/if.h> +#ifndef SIOCIWFIRSTPRIV +#define SIOCIWFIRSTPRIV SIOCDEVPRIVATE +#endif + class ONetworkInterface; class OWirelessNetworkInterface; class OChannelHopper; |