Skip to contentSkip to conversation

monitor: include unistd.h in main.c

PATCH Applied James Prestwood 2 participants 2 messages Jan 4, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 monitor: include unistd.h in main.c

This fixes a build break on some systems, specifically the raspberry Pi 3 (ARM):

monitor/main.c: In function ‘open_packet’:
monitor/main.c:176:3: error: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Werror=implicit-function-declaration]

  176 |   close(fd);
      |   ^~~~~
      |   pclose
---
 monitor/main.c | 1 +
 1 file changed, 1 insertion(+)
monitor/main.c +1 -0
index e9384e1b..8f354d52 100644
@@ -32,6 +32,7 @@
 #include <string.h>
 #include <getopt.h>
 #include <signal.h>
+#include <unistd.h>
 #include <arpa/inet.h>
 #include <sys/socket.h>
 #include <linux/genetlink.h>
Signature · 1 line
2.34.1
#1 lore raw

Hi James,

Quoted 12 lines · James Prestwood

This fixes a build break on some systems, specifically the raspberry Pi 3 (ARM):

monitor/main.c: In function ‘open_packet’:
monitor/main.c:176:3: error: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Werror=implicit-function-declaration]

   176 |   close(fd);
       |   ^~~~~
       |   pclose
---
  monitor/main.c | 1 +
  1 file changed, 1 insertion(+)

Applied, thanks.

Regards,
-Denis