commit 7e0b9b7a547fafdd9cba78cf75747d4ed498a29a
parent 02ee2df95203fc41b16284f6677f9863813f9212
Author: Marcel Holtmann <marcel@holtmann.org>
Date: Tue, 10 Feb 2026 09:11:26 +0100
knownnetworks: Fix build issue with missing _GNU_SOURCE
CC src/knownnetworks.o
src/knownnetworks.c: In function ‘known_networks_init’:
src/knownnetworks.c:1100:39: error: ‘DT_UNKNOWN’ undeclared (first use in this function)
1100 | if (dirent->d_type == DT_UNKNOWN) {
| ^~~~~~~~~~
src/knownnetworks.c:1100:39: note: each undeclared identifier is reported only once for each function it appears in
src/knownnetworks.c:1103:46: error: ‘DT_REG’ undeclared (first use in this function)
1103 | } else if (dirent->d_type != DT_REG &&
| ^~~~~~
src/knownnetworks.c:1104:67: error: ‘DT_LNK’ undeclared (first use in this function)
1104 | dirent->d_type != DT_LNK) {
| ^~~~~~
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/knownnetworks.c b/src/knownnetworks.c
@@ -24,6 +24,7 @@
#include <config.h>
#endif
+#define _GNU_SOURCE
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>