Debian Patches

Status for smcroute/2.5.7-2

Patch Description Author Forwarded Bugs Origin Last update
fix_glibc_2.43_build_failures.patch Fix build failures with glibc >= 2.43
This fixes build failures that have glibc 2.43 installed as it is currently
available in Debian experimental:

smcroute fails to build from source with glibc 2.43, currently in
experimental. From the build log:

| smcrouted.c: In function ‘progname’:
| smcrouted.c:342:12: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
| 342 | nm = strrchr(arg0, '/');
| | ^
| smcroutectl.c: In function ‘progname’:
| smcroutectl.c:497:12: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
| 497 | nm = strrchr(arg0, '/');
| | ^
| cc1: all warnings being treated as errors
| make[3]: *** [Makefile:513: smcrouted-smcrouted.o] Error 1
| make[3]: *** Waiting for unfinished jobs....
| cc1: all warnings being treated as errors
| make[3]: *** [Makefile:499: smcroutectl-smcroutectl.o] Error 1
| make[3]: Leaving directory '/build/reproducible-path/smcroute-2.5.7/src'
| make[2]: *** [Makefile:505: all-recursive] Error 1
| make[2]: Leaving directory '/build/reproducible-path/smcroute-2.5.7'
| make[1]: *** [Makefile:367: all] Error 2
| make[1]: Leaving directory '/build/reproducible-path/smcroute-2.5.7'
| dh_auto_build: error: make -j128 returned exit code 2
| make: *** [debian/rules:25: binary] Error 25
| dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2

The full build log is available here [1].

This was initially reported by Aurelien Jarno as Debian bug #1128751
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1128751

The issue is due to ISO C23 declaration of bsearch, memchr, strchr,
strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr,
which now returns a pointer to a const-qualified type when the input
argument is a pointer to a const-qualified type [2].

The commit fixes the build failure by using const-qualified char pointers.
This works also in older build environments as they are used as read-only
variables anyways.

Regards,
Micha

[1] https://people.debian.org/~ema/glibc-2.43-rebuilds/output-1/smcroute_arm64.build
[2] https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=e271fb2e4d76903c77a302aaec1ca22ce31027d0;hb=f762ccf84f122d1354f103a151cba8bde797d521#l19
Micha Lenk <micha@lenk.info> yes debian 2026-04-06

All known versions for source package 'smcroute'

Links