What to use for socklen_t in Haiku

I’m trying to compile the BSD finger tool from source in Haiku, mostly for kicks, but also because a friend of mine actually has a working .plan and a site he hosts it on (Happy net box, hosted here: https://happynetbox.com/)

However, running the configure script fails when checking for socklen_t, with the following error:

'Cannot work out what to use for socklen_t. Help…

I figure this might be a trivial fix, but I’m still open to ideas or advice or pointers.

The codebase is here: GitHub - Distrotech/bsd-finger

It looks to be declared here haiku/socket.h at 8f16317a5b6db5c672f331814273e5857555020f · haiku/haiku · GitHub

The message comes from here:

A few lines above you can see the code it tried to compile. Unfortunately it does not store the compiler output (it is redirected to /dev/null) so there is no way to know what went wrong without some patching to the configure script, or re-running the command manually.

Or you can try a guess: the first test uses getpeername, but did it link with libnetwork? Would the missing library cause the build to fail? Can you try adding -lnetwork to the compiler flags and see if that helps?

1 Like