3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2026-02-11 15:17:57 +01:00

rfkill: Fix build issue with missing _GNU_SOURCE

CC       src/rfkill.o
In file included from ./ell/ell.h:1,
                 from src/rfkill.c:35:
src/rfkill.c: In function ‘rfkill_init’:
src/rfkill.c:282:49: error: ‘O_CLOEXEC’ undeclared (first use in this function); did you mean ‘FD_CLOEXEC’?
  282 |         fd = L_TFR(open("/dev/rfkill", O_RDWR | O_CLOEXEC));
      |                                                 ^~~~~~~~~
./ell/util.h:348:34: note: in definition of macro ‘L_TFR’
  348 |        do __result = (long int) (expression);      \
      |                                  ^~~~~~~~~~
src/rfkill.c:282:49: note: each undeclared identifier is reported only once for each function it appears in
  282 |         fd = L_TFR(open("/dev/rfkill", O_RDWR | O_CLOEXEC));
      |                                                 ^~~~~~~~~
./ell/util.h:348:34: note: in definition of macro ‘L_TFR’
  348 |        do __result = (long int) (expression);      \
      |                                  ^~~~~~~~~~
This commit is contained in:
Marcel Holtmann 2026-02-10 09:12:20 +01:00
parent 7e0b9b7a54
commit 13253a4aed

View File

@ -24,6 +24,7 @@
#include <config.h>
#endif
#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>