ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] libnsl, libsocket

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Dr. Uwe Girlich" <Uwe.Girlich@xxxxxxxxxxx>
Date: Thu, 3 May 2001 09:48:26 +0200
Hello!

The libnsl,libsocket-dependency is a real nightmare. On many SysVR4 systems,
libsocket.so needs libnsl.so but the symbol gethostbyname() is in libsocket.so
and not in libnsl.so where we check for it in acinclude.m4.

If we would change the test to gethostname (which is in libnsl on most systems
I checked (it isn't in HP-UX 10)), this would equally be wrong, because we
don't need gethostname() but only gethostbyname() and so link against libnsl
also on systems, where we don't need it.

The only way I see, is to look for the existence of libnsl (simple check for
function main()) and then try to find connect() in libsocket alone and only if
this fails together with $NSL_LIBS.

What do you think?

Bye, Uwe