diff mbox series

Fix system header includes

Message ID 20200508193016.3951932-1-raj.khem@gmail.com (mailing list archive)
State New, archived
Headers show
Series Fix system header includes | expand

Commit Message

Khem Raj May 8, 2020, 7:30 p.m. UTC
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];
      |                ^~~~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ras-events.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ras-events.c b/ras-events.c
index 511c93d..400e740 100644
--- a/ras-events.c
+++ b/ras-events.c
@@ -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"