commit e5e7e67d0d143e0f5c6512b1f2042aa25d52bc24
parent 88d2718b507c95ca8f78e85eabf4eba1ff4d2c29
Author: Marcel Holtmann <marcel@holtmann.org>
Date: Tue, 10 Feb 2026 09:20:52 +0100
resolve: Fix build issue with missing _GNU_SOURCE
CC src/resolve.o
src/resolve.c: In function ‘resolvconf_invoke’:
src/resolve.c:386:30: error: implicit declaration of function ‘popen’; did you mean ‘fopen’? [-Wimplicit-function-declaration]
386 | resolvconf = popen(cmd, "w");
| ^~~~~
| fopen
src/resolve.c:386:28: error: assignment to ‘FILE *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
386 | resolvconf = popen(cmd, "w");
| ^
src/resolve.c:390:28: error: assignment to ‘FILE *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
390 | resolvconf = popen(cmd, "r");
| ^
src/resolve.c:403:17: error: implicit declaration of function ‘pclose’; did you mean ‘close’? [-Wimplicit-function-declaration]
403 | error = pclose(resolvconf);
| ^~~~~~
| close
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/resolve.c b/src/resolve.c
@@ -24,6 +24,7 @@
#include <config.h>
#endif
+#define _GNU_SOURCE
#include <errno.h>
#include <arpa/inet.h>
#include <sys/stat.h>