[PATCH net-next] bpf: selftests: include <sys/resource.h> to fix build error

Subsystems: bpf [general] (safe dynamic programs and tools), bpf [selftests] (test runners & infrastructure), kernel selftest framework, the rest

STALE3538d

2 messages, 2 authors, 2016-11-28 · open the first message on its own page

[PATCH net-next] bpf: selftests: include <sys/resource.h> to fix build error

From: Colin King <hidden>
Date: 2016-11-28 11:46:11

From: Colin Ian King <redacted>

Fix incomplete type build error on struct rlimit by including
<sys/resource.h>, fixes:

test_lru_map.c:552:9: error: variable ‘r’ has initializer
 but incomplete type
  struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
         ^
test_lru_map.c:552:21: error: ‘RLIM_INFINITY’ undeclared
 (first use in this function)
  struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};

Signed-off-by: Colin Ian King <redacted>
---
 tools/testing/selftests/bpf/test_lru_map.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/bpf/test_lru_map.c b/tools/testing/selftests/bpf/test_lru_map.c
index 627757e..fde54a2 100644
--- a/tools/testing/selftests/bpf/test_lru_map.c
+++ b/tools/testing/selftests/bpf/test_lru_map.c
@@ -13,6 +13,7 @@
 #include <assert.h>
 #include <sched.h>
 #include <sys/wait.h>
+#include <sys/resource.h>
 #include <stdlib.h>
 #include <time.h>
 #include "bpf_sys.h"
-- 
2.10.2

Re: [PATCH net-next] bpf: selftests: include <sys/resource.h> to fix build error

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2016-11-28 12:22:34

On 11/28/2016 12:45 PM, Colin King wrote:
From: Colin Ian King <redacted>

Fix incomplete type build error on struct rlimit by including
<sys/resource.h>, fixes:

test_lru_map.c:552:9: error: variable ‘r’ has initializer
  but incomplete type
   struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
          ^
test_lru_map.c:552:21: error: ‘RLIM_INFINITY’ undeclared
  (first use in this function)
   struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};

Signed-off-by: Colin Ian King <redacted>
Thanks for the patch, fixed here already:

https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=e00c7b216f34444252f3771f7d4ed48d4f032636
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help