aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface_unix.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-03-26 09:40:35 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-26 09:40:35 (GMT)
commit31afdd227438e1c927f3b5c70c0c366ceb95eec8 (patch)
tree4a7b4476bd56b0433825754bf0a25e5d47018f89 /wpa_supplicant/ctrl_iface_unix.c
parent6d07e760209879a3f94ee48f1e8022180d8ca176 (diff)
downloadhostap-31afdd227438e1c927f3b5c70c0c366ceb95eec8.zip
hostap-31afdd227438e1c927f3b5c70c0c366ceb95eec8.tar.gz
hostap-31afdd227438e1c927f3b5c70c0c366ceb95eec8.tar.bz2
Use TIOCOUTQ instead of SIOCOUTQ to avoid need for linux/sockios.h
All that the kernel header was doing here is defining SIOCOUTQ to be TIOCOUTQ. Instead of pulling in the header, we might as well use TIOCOUTQ directly. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/ctrl_iface_unix.c')
-rw-r--r--wpa_supplicant/ctrl_iface_unix.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c
index 2fc89a9..4db712f 100644
--- a/wpa_supplicant/ctrl_iface_unix.c
+++ b/wpa_supplicant/ctrl_iface_unix.c
@@ -15,7 +15,6 @@
#include <fcntl.h>
#ifdef __linux__
#include <sys/ioctl.h>
-#include <linux/sockios.h>
#endif /* __linux__ */
#ifdef ANDROID
#include <cutils/sockets.h>
@@ -90,7 +89,7 @@ static void wpas_ctrl_sock_debug(const char *title, int sock, const char *buf,
if (getsockopt(sock, SOL_SOCKET, SO_SNDBUF, &sndbuf, &optlen) < 0)
sndbuf = -1;
- if (ioctl(sock, SIOCOUTQ, &outq) < 0)
+ if (ioctl(sock, TIOCOUTQ, &outq) < 0)
outq = -1;
wpa_printf(level,
@@ -289,7 +288,7 @@ static int wpas_ctrl_iface_throttle(int sock)
optlen = sizeof(sndbuf);
sndbuf = 0;
if (getsockopt(sock, SOL_SOCKET, SO_SNDBUF, &sndbuf, &optlen) < 0 ||
- ioctl(sock, SIOCOUTQ, &outq) < 0 ||
+ ioctl(sock, TIOCOUTQ, &outq) < 0 ||
sndbuf <= 0 || outq < 0)
return 0;
return outq > sndbuf / 2;