Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 1 | From 18786db1ad03716267927d983c83275469a1478a Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 8 May 2020 12:27:19 -0700 |
| 4 | Subject: [PATCH] Fix system header includes |
| 5 | |
| 6 | Use poll.h instead of sys/poll.h |
| 7 | Fixes |
| 8 | warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] |
| 9 | |
| 10 | Include limits.h for PATH_MAX |
| 11 | |
| 12 | Fixes |
| 13 | ras-events.c:359:16: error: 'PATH_MAX' undeclared (first use in this function) |
| 14 | 359 | char pipe_raw[PATH_MAX]; |
| 15 | | ^~~~~~~~ |
| 16 | |
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 18 | --- |
| 19 | ras-events.c | 3 ++- |
| 20 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 21 | |
| 22 | diff --git a/ras-events.c b/ras-events.c |
| 23 | index 511c93d..400e740 100644 |
| 24 | --- a/ras-events.c |
| 25 | +++ b/ras-events.c |
| 26 | @@ -18,13 +18,14 @@ |
| 27 | #include <dirent.h> |
| 28 | #include <errno.h> |
| 29 | #include <fcntl.h> |
| 30 | +#include <limits.h> |
| 31 | +#include <poll.h> |
| 32 | #include <stdio.h> |
| 33 | #include <stdlib.h> |
| 34 | #include <string.h> |
| 35 | #include <unistd.h> |
| 36 | #include <sys/stat.h> |
| 37 | #include <sys/types.h> |
| 38 | -#include <sys/poll.h> |
| 39 | #include <signal.h> |
| 40 | #include <sys/signalfd.h> |
| 41 | #include "libtrace/kbuffer.h" |
| 42 | -- |
| 43 | 2.26.2 |
| 44 | |