Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 879601 - net-misc/socat- musl workaround no longer needed
Summary: net-misc/socat- musl workaround no longer needed
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sam James
Keywords: PullRequest
Depends on:
Blocks: clang-16-porting
  Show dependency tree
Reported: 2022-11-04 17:18 UTC by Carlos
Modified: 2022-11-23 01:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

build.log (socat.log,67.53 KB, text/x-log)
2022-11-04 17:19 UTC, Carlos
emerge --info output (emerge-info.txt,8.43 KB, text/plain)
2022-11-04 17:20 UTC, Carlos

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos 2022-11-04 17:18:25 UTC
The `use elibc_musl && export sc_cv_getprotobynumber_r=2' line now causes a variant of getprotobynumber_r to be enabled, breaking the build.

Reproducible: Always

Steps to Reproduce:
Attempt to build net-misc/socat-
Actual Results:  
fdname.c:294:19: error: call to undeclared function 'getprotobynumber_r'; ISO C99 and later do not support implicit function declarations

Expected Results:  
./configure correctly recognizes the absence of getprotobynumber_r in musl.

If I recall correctly, a better fix for the original ./configure issue in <=socat- was to insert -Werror=implicit-function-declaration to CFLAGS. This way, the conftest.c's for every getprotobynumber would fail during compilation.
Comment 1 Carlos 2022-11-04 17:19:24 UTC
Created attachment 827095 [details]
Comment 2 Carlos 2022-11-04 17:20:55 UTC
Created attachment 827097 [details]
emerge --info output
Comment 3 Larry the Git Cow gentoo-dev 2022-11-23 01:45:10 UTC
The bug has been closed via the following commit(s):

commit f335bad455c9308a8a4df5997f9e772b6288f056
Author:     Petr Vaněk <>
AuthorDate: 2022-11-21 08:03:46 +0000
Commit:     Sam James <>
CommitDate: 2022-11-23 01:42:42 +0000

    net-misc/socat: fix build on musl
    The issue with undefined reference to getprotobynumber_r for musl was
    fixed in in commit [1]. It is no longer wanted to treat musl
    configuration specially.
    Signed-off-by: Petr Vaněk <>
    Signed-off-by: Sam James <>

 net-misc/socat/socat- | 6 ------
 1 file changed, 6 deletions(-)