Skip to contentSkip to conversation

Fix system header includes

PATCH New Khem Raj 1 participant 1 message May 8, 2020 EDAC-core

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 Fix system header includes

Use poll.h instead of sys/poll.h
Fixes
warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]

Include limits.h for PATH_MAX

Fixes
ras-events.c:359:16: error: 'PATH_MAX' undeclared (first use in this function)

  359 |  char pipe_raw[PATH_MAX];
      |                ^~~~~~~~
---
 ras-events.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
ras-events.c +2 -1
index 511c93d..400e740 100644
@@ -18,13 +18,14 @@
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <limits.h>
+#include <poll.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <sys/poll.h>
 #include <signal.h>
 #include <sys/signalfd.h>
 #include "libtrace/kbuffer.h"
Signature · 1 line
2.26.2