diff mbox series

[v2,5/5] Fix build warnings.

Message ID 60217b778ab4743cba6463b6cd4770081547cb57.1665246792.git.geoff@infradead.org
State New
Headers show
Series [v2,1/5] bootstrap: Fix warnings | expand

Commit Message

Geoff Levand Oct. 8, 2022, 4:42 p.m. UTC
Fixes build warnings like these:

  warning: implicit declaration of function ‘memmem’
  warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 discover/paths.c       | 2 ++
 discover/pxe-parser.c  | 4 +++-
 ui/ncurses/nc-plugin.c | 1 +
 3 files changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/discover/paths.c b/discover/paths.c
index 3c43bf6..19674bb 100644
--- a/discover/paths.c
+++ b/discover/paths.c
@@ -2,6 +2,8 @@ 
 #include "config.h"
 #endif
 
+#define _GNU_SOURCE
+
 #include <assert.h>
 #include <netdb.h>
 #include <string.h>
diff --git a/discover/pxe-parser.c b/discover/pxe-parser.c
index 035794c..2b10771 100644
--- a/discover/pxe-parser.c
+++ b/discover/pxe-parser.c
@@ -1,7 +1,9 @@ 
-
 #if defined(HAVE_CONFIG_H)
 #include "config.h"
 #endif
+
+#define _GNU_SOURCE
+
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/ui/ncurses/nc-plugin.c b/ui/ncurses/nc-plugin.c
index f897cc8..1152bf3 100644
--- a/ui/ncurses/nc-plugin.c
+++ b/ui/ncurses/nc-plugin.c
@@ -20,6 +20,7 @@ 
 #endif
 
 #include <errno.h>
+#include <libgen.h>
 #include <stdlib.h>
 #include <string.h>