]> www.infradead.org Git - users/jedix/linux-maple.git/commit
libbpf: Add namespace for errstr making it libbpf_errstr
authorIan Rogers <irogers@google.com>
Thu, 20 Mar 2025 22:24:39 +0000 (15:24 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 21 Mar 2025 20:44:54 +0000 (13:44 -0700)
commit307ef667e94530c2f2f77797bfe9ea85c22bec7d
tree24324339cfcd3f0b078631b35d3a98d97b5735a5
parent51d65049cd7e22a4d9ab8f2acb018a147f7f5146
libbpf: Add namespace for errstr making it libbpf_errstr

When statically linking symbols can be replaced with those from other
statically linked libraries depending on the link order and the hoped
for "multiple definition" error may not appear. To avoid conflicts it
is good practice to namespace symbols, this change renames errstr to
libbpf_errstr. To avoid churn a #define is used to turn use of
errstr(err) to libbpf_errstr(err).

Fixes: 1633a83bf993 ("libbpf: Introduce errstr() for stringifying errno")
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250320222439.1350187-1-irogers@google.com
tools/lib/bpf/str_error.c
tools/lib/bpf/str_error.h