Skip to content

apr: fix musl build#3046

Open
bkuhls wants to merge 1 commit into
signalwire:masterfrom
bkuhls:fix-apr-musl
Open

apr: fix musl build#3046
bkuhls wants to merge 1 commit into
signalwire:masterfrom
bkuhls:fix-apr-musl

Conversation

@bkuhls
Copy link
Copy Markdown

@bkuhls bkuhls commented May 29, 2026

Description

strerror_r on musl always returns an int since its addition back in 2011 with
https://git.musl-libc.org/cgit/musl/commit/src/string/strerror_r.c?id=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01

Add defines created by freeswitch configure to apr subproject to fix the build error:

misc/unix/errorcodes.c: In function ‘native_strerror’: misc/unix/errorcodes.c:358:9: error: assignment to ‘const char *’ from
 ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  358 |     msg = strerror_r(statcode, buf, bufsize);

Type of Change

  • Bug fix

Checklist

  • I have read the CONTRIBUTING guidelines
  • My code follows the project's style guidelines

strerror_r on musl always returns an int since its addition back in 2011
with
https://git.musl-libc.org/cgit/musl/commit/src/string/strerror_r.c?id=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01

Add defines created by freeswitch configure to apr subproject to fix the
build error:

misc/unix/errorcodes.c: In function ‘native_strerror’:
misc/unix/errorcodes.c:358:9: error: assignment to ‘const char *’ from
 ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  358 |     msg = strerror_r(statcode, buf, bufsize);

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant