Repository navigation
configure.ac: look for the socket functions in libnetwork too - #73
Conversation
|
Thank you. I have two questions.
|
|
Thank you for the questions. 1. BeOS. You are correct, and my description is wrong. BeOS R5 has the socket functions in 2. Thus this pull request does not add a new function. It only removes the need to know about |
|
Thanks for the clarification.
No, this is a trivial change and harmless on other systems so I think we can just take this and make life easier for everyone :-) |
Haiku has inet_pton(), the other socket functions and h_errno in libnetwork. Without it, the JNI libraries fail to load (undefined __h_errno) and configure does not find the socket functions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: duncanmcqueen <206344294+duncanmcqueen@users.noreply.github.com>
33a6643 to
b8a7f76
Compare
|
Works for me! |
Split from #60.
Problem and fix
On Haiku, the socket functions (
socket,connect,inet_pton,gethostbynameand the others) andh_errno(__h_errno) are inlibnetwork, not inlibroot(the C library).configure.aclooks forinet_ptonin the C library and inlibnslonly. Thus on Haiku:inet_ptonand the other socket functions.libjavanio.so,libjavanet.so) do not link withlibnetwork. They compile, but they do not load:Symbol not found. Each program stops at the start, because the VM cannot loadlibjavanio.so.Now
AC_SEARCH_LIBSforinet_ptonalso looks inlibnetwork.How to reproduce
On Haiku, with #74 and #75 (without them,
masterdoes not build on Haiku):Then run this program:
NetBasics.javaResults
Haiku R1/beta6 x86_64 (hrev59866),
javacfrom OpenJDK 8, Kaffe 1.1.10-pre. I ranautoreconfon Linux (autoconf 2.73, automake 1.19) and built on Haiku out of tree with--enable-jni --disable-examples --disable-plugin --disable-gjdoc --disable-gtk-peer --disable-gconf-peer --disable-alsa --disable-dssi.Platforms
Specific to Haiku. (BeOS has the socket functions in
libnet, and BONE has them inlibsocketandlibbind.)AC_SEARCH_LIBStries the libraries only when the function is not in the C library. On Linux, configure giveschecking for library containing inet_pton... none requiredandchecking how many arguments gethostbyname_r() takes... six, so it does not add-lnetworkon Linux.AI assistance
An AI model (Claude Code, by Anthropic) wrote this change, the test and this text. The repository owner directed the work and checked the results. Please review it as you review other contributions.
🤖 Generated with Claude Code