Repository navigation
configure.ac: look for the socket functions in libnetwork too - #73
Open
duncanmcqueen wants to merge 1 commit into
Open
duncanmcqueen wants to merge 1 commit into
duncanmcqueen wants to merge 1 commit into
Conversation
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>
This was referenced Oct 14, 2026
Closed
duncanmcqueen
marked this pull request as ready for review
October 14, 2026 23:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 (and BeOS, which also has
libnetwork).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