#include <config.h>
#endif
+#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
if (rfkill_type == NUM_RFKILL_TYPES)
return -EINVAL;
- fd = open("/dev/rfkill", O_RDWR);
+ fd = open("/dev/rfkill", O_RDWR | O_CLOEXEC);
if (fd < 0)
return fd;
DBG("");
- fd = open("/dev/rfkill", O_RDWR);
+ fd = open("/dev/rfkill", O_RDWR | O_CLOEXEC);
if (fd < 0) {
connman_error("Failed to open RFKILL control device");
return -EIO;