diff mbox series

[bpf] bpf: samples/sockmap fix Makefile for build error

Message ID 20180213044249.7232-1-bhole_prashant_q7@lab.ntt.co.jp
State Accepted, archived
Delegated to: BPF Maintainers
Headers show
Series [bpf] bpf: samples/sockmap fix Makefile for build error | expand

Commit Message

Prashant Bhole Feb. 13, 2018, 4:42 a.m. UTC
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>
---
 samples/sockmap/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexei Starovoitov Feb. 14, 2018, 1:48 a.m. UTC | #1
On Tue, Feb 13, 2018 at 01:42:49PM +0900, Prashant Bhole wrote:
> 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>

Applied to bpf-next, thanks Prashant!
John Fastabend Feb. 14, 2018, 2:26 a.m. UTC | #2
On 02/13/2018 05:48 PM, Alexei Starovoitov wrote:
> On Tue, Feb 13, 2018 at 01:42:49PM +0900, Prashant Bhole wrote:
>> 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>
> 
> Applied to bpf-next, thanks Prashant!
> 

Thanks!

Acked-by: John Fastabend <john.fastabend@gmail.com>
diff mbox series

Patch

diff --git a/samples/sockmap/Makefile b/samples/sockmap/Makefile
index 73f1da4d116c..9bf2881bd11b 100644
--- a/samples/sockmap/Makefile
+++ b/samples/sockmap/Makefile
@@ -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/