bpf: samples/sockmap fix Makefile for build error
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Tue, 13 Feb 2018 04:42:49 +0000 (13:42 +0900)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 14 Feb 2018 01:45:34 +0000 (17:45 -0800)
While building samples/sockmap, undefined reference error is thrown
for `nla_dump_errormsg'.
Linking tools/lib/bpf/nlattr.o as a fix

Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
samples/sockmap/Makefile

index 73f1da4..9bf2881 100644 (file)
@@ -2,7 +2,7 @@
 hostprogs-y := sockmap
 
 # Libbpf dependencies
-LIBBPF := ../../tools/lib/bpf/bpf.o
+LIBBPF := ../../tools/lib/bpf/bpf.o ../../tools/lib/bpf/nlattr.o
 
 HOSTCFLAGS += -I$(objtree)/usr/include
 HOSTCFLAGS += -I$(srctree)/tools/lib/