bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next] libbpf: Fix libbpf_common.h when installing libbpf through 'make install'
@ 2019-12-17 11:28 Toke Høiland-Jørgensen
  2019-12-17 21:58 ` Yonghong Song
  0 siblings, 1 reply; 3+ messages in thread
From: Toke Høiland-Jørgensen @ 2019-12-17 11:28 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann
  Cc: Toke Høiland-Jørgensen, netdev, bpf

This fixes two issues with the newly introduced libbpf_common.h file:

- The header failed to include <string.h> for the definition of memset()
- The new file was not included in the install_headers rule in the Makefile

Both of these issues cause breakage when installing libbpf with 'make
install' and trying to use it in applications.

Fixes: 544402d4b493 ("libbpf: Extract common user-facing helpers")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
---
 tools/lib/bpf/Makefile        | 1 +
 tools/lib/bpf/libbpf_common.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index a3718cb275f2..d4790121adf4 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -251,6 +251,7 @@ install_headers: bpf_helper_defs.h
 		$(call do_install,libbpf.h,$(prefix)/include/bpf,644); \
 		$(call do_install,btf.h,$(prefix)/include/bpf,644); \
 		$(call do_install,libbpf_util.h,$(prefix)/include/bpf,644); \
+		$(call do_install,libbpf_common.h,$(prefix)/include/bpf,644); \
 		$(call do_install,xsk.h,$(prefix)/include/bpf,644); \
 		$(call do_install,bpf_helpers.h,$(prefix)/include/bpf,644); \
 		$(call do_install,bpf_helper_defs.h,$(prefix)/include/bpf,644); \
diff --git a/tools/lib/bpf/libbpf_common.h b/tools/lib/bpf/libbpf_common.h
index 4fb833840961..a23ae1ac27eb 100644
--- a/tools/lib/bpf/libbpf_common.h
+++ b/tools/lib/bpf/libbpf_common.h
@@ -9,6 +9,8 @@
 #ifndef __LIBBPF_LIBBPF_COMMON_H
 #define __LIBBPF_LIBBPF_COMMON_H
 
+#include <string.h>
+
 #ifndef LIBBPF_API
 #define LIBBPF_API __attribute__((visibility("default")))
 #endif
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next] libbpf: Fix libbpf_common.h when installing libbpf through 'make install'
  2019-12-17 11:28 [PATCH bpf-next] libbpf: Fix libbpf_common.h when installing libbpf through 'make install' Toke Høiland-Jørgensen
@ 2019-12-17 21:58 ` Yonghong Song
  2019-12-17 23:21   ` Daniel Borkmann
  0 siblings, 1 reply; 3+ messages in thread
From: Yonghong Song @ 2019-12-17 21:58 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen, Alexei Starovoitov, Daniel Borkmann
  Cc: netdev, bpf



On 12/17/19 3:28 AM, Toke Høiland-Jørgensen wrote:
> This fixes two issues with the newly introduced libbpf_common.h file:
> 
> - The header failed to include <string.h> for the definition of memset()
> - The new file was not included in the install_headers rule in the Makefile
> 
> Both of these issues cause breakage when installing libbpf with 'make
> install' and trying to use it in applications.
> 
> Fixes: 544402d4b493 ("libbpf: Extract common user-facing helpers")
> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>

Acked-by: Yonghong Song <yhs@fb.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next] libbpf: Fix libbpf_common.h when installing libbpf through 'make install'
  2019-12-17 21:58 ` Yonghong Song
@ 2019-12-17 23:21   ` Daniel Borkmann
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2019-12-17 23:21 UTC (permalink / raw)
  To: Yonghong Song, Toke Høiland-Jørgensen, Alexei Starovoitov
  Cc: netdev, bpf

On 12/17/19 10:58 PM, Yonghong Song wrote:
> On 12/17/19 3:28 AM, Toke Høiland-Jørgensen wrote:
>> This fixes two issues with the newly introduced libbpf_common.h file:
>>
>> - The header failed to include <string.h> for the definition of memset()
>> - The new file was not included in the install_headers rule in the Makefile
>>
>> Both of these issues cause breakage when installing libbpf with 'make
>> install' and trying to use it in applications.
>>
>> Fixes: 544402d4b493 ("libbpf: Extract common user-facing helpers")
>> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
> 
> Acked-by: Yonghong Song <yhs@fb.com>

Applied, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-17 23:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 11:28 [PATCH bpf-next] libbpf: Fix libbpf_common.h when installing libbpf through 'make install' Toke Høiland-Jørgensen
2019-12-17 21:58 ` Yonghong Song
2019-12-17 23:21   ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).