diff options
Diffstat (limited to 'contrib/package/iwinfo/src/iwinfo_wl.c')
-rw-r--r-- | contrib/package/iwinfo/src/iwinfo_wl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/package/iwinfo/src/iwinfo_wl.c b/contrib/package/iwinfo/src/iwinfo_wl.c index 2dac12b1af..81df81faf4 100644 --- a/contrib/package/iwinfo/src/iwinfo_wl.c +++ b/contrib/package/iwinfo/src/iwinfo_wl.c @@ -30,7 +30,10 @@ static int wl_ioctl(const char *name, int cmd, void *buf, int len) /* prepare socket */ if( ioctl_socket == -1 ) + { ioctl_socket = socket(AF_INET, SOCK_DGRAM, 0); + fcntl(ioctl_socket, F_SETFD, fcntl(ioctl_socket, F_GETFD) | FD_CLOEXEC); + } /* do it */ ioc.cmd = cmd; |