On 11/28/2016 05:32 AM, David Ahern wrote:
Build of samples/bpf on debian/jessie fails with:

   HOSTCC  /home/dsa/kernel-3.git/samples/bpf/test_lru_dist.o
/home/dsa/kernel-3.git/samples/bpf/test_lru_dist.c: In function ‘main’:
/home/dsa/kernel-3.git/samples/bpf/test_lru_dist.c:490:9: error: variable ‘r’ 
has initializer but incomplete type
   struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
          ^
/home/dsa/kernel-3.git/samples/bpf/test_lru_dist.c:490:21: error: 
‘RLIM_INFINITY’ undeclared (first use in this function)
   struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
                      ^
/home/dsa/kernel-3.git/samples/bpf/test_lru_dist.c:490:21: note: each 
undeclared identifier is reported only once for each function it appears in
/home/dsa/kernel-3.git/samples/bpf/test_lru_dist.c:490:9: warning: excess 
elements in struct initializer
   struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
          ^
/home/dsa/kernel-3.git/samples/bpf/test_lru_dist.c:490:9: warning: (near 
initialization for ‘r’)
/home/dsa/kernel-3.git/samples/bpf/test_lru_dist.c:490:9: warning: excess 
elements in struct initializer
/home/dsa/kernel-3.git/samples/bpf/test_lru_dist.c:490:9: warning: (near 
initialization for ‘r’)
/home/dsa/kernel-3.git/samples/bpf/test_lru_dist.c:490:16: error: storage size 
of ‘r’ isn’t known
   struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};

Add sys/resource.h to the include list

Fixes: 5db58faf989f ("bpf: Add tests for the LRU bpf_htab")
Signed-off-by: David Ahern <[email protected]>
Cc: Martin KaFai Lau <[email protected]>

Ran into the same issue, fixed here already:

https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=e00c7b216f34444252f3771f7d4ed48d4f032636

Reply via email to