Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 926341

Summary: sys-apps/iproute2-6.6.0-r3 - bpf_legacy.c:974:5: error: call to undeclared function 'basename'
Product: Gentoo Linux Reporter: ernsteiswuerfel <erhard_f>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: erhard_f
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 926147    
Attachments: build.log
emerge --info

Description ernsteiswuerfel archtester 2024-03-07 09:53:24 UTC
Created attachment 886891 [details]
build.log

[...]
clang -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -Os -march=x86-64-v2 -pipe  -pipe -I../include -I../include/uapi -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DCONF_USR_DIR=\"/usr/share/iproute2\" -DCONF_ETC_DIR=\"/etc/iproute2\" -DNETNS_RUN_DIR=\"/run/netns\" -DNETNS_ETC_DIR=\"/etc/netns\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Os -march=x86-64-v2 -pipe -DHAVE_HANDLE_AT -DHAVE_HANDLE_AT -DHAVE_SETNS -DHAVE_SETNS -DHAVE_LIBMNL -DHAVE_LIBMNL -fPIC   -c -o color.o color.c
clang -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -Os -march=x86-64-v2 -pipe  -pipe -I../include -I../include/uapi -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DCONF_USR_DIR=\"/usr/share/iproute2\" -DCONF_ETC_DIR=\"/etc/iproute2\" -DNETNS_RUN_DIR=\"/run/netns\" -DNETNS_ETC_DIR=\"/etc/netns\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Os -march=x86-64-v2 -pipe -DHAVE_HANDLE_AT -DHAVE_HANDLE_AT -DHAVE_SETNS -DHAVE_SETNS -DHAVE_LIBMNL -DHAVE_LIBMNL -fPIC   -c -o bpf_legacy.o bpf_legacy.c
bpf_legacy.c:974:5: error: call to undeclared function 'basename'; ISO C99
      and later do not support implicit function declarations [-Wimplicit-function-declaration]
  974 |                          basename(cfg->object), cfg->mode == EBPF_PINNED ?
      |                          ^
bpf_legacy.c:974:5: warning: format specifies type 'char *' but the
      argument has type 'int' [-Wformat]
  973 |                 snprintf(annotation, sizeof(annotation), "%s:[%s]",
      |                                                           ~~
      |                                                           %d
  974 |                          basename(cfg->object), cfg->mode == EBPF_PINNED ?
      |                          ^~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
make[1]: *** [../config.include:24: bpf_legacy.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-apps/iproute2-6.6.0-r3/work/iproute2-6.6.0/lib'
make: *** [Makefile:78: all] Error 2
Comment 1 ernsteiswuerfel archtester 2024-03-07 09:54:55 UTC
Created attachment 886892 [details]
emerge --info
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2024-04-30 19:33:48 UTC
>>> Emerging (1 of 1) sys-apps/iproute2-6.8.0-r2::gentoo
>>> Installing (1 of 1) sys-apps/iproute2-6.8.0-r2::gentoo
>>> Completed (1 of 1) sys-apps/iproute2-6.8.0-r2::gentoo

works fine with musl-1.2.5 and iproute2-6.8.0-r2