Re: [PATCH 4/6] meson: add a couple missing networking dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 21, 2025 at 01:51:48PM -0400, Eli Schwartz wrote:
> As evidenced in config.mak.uname and configure.ac, there are various
> possible scenarios where these libraries are default-enabled in the
> build, which mainly boils down to: SunOS. -lresolv is simply not the
> only library that, when it exists, probably needs to be linked to for
> networking.
> 
> Check for and add -lnsl -lsocket as well.
> 
> Signed-off-by: Eli Schwartz <eschwartz@xxxxxxxxxx>
> ---
>  meson.build | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 8037e536dd..8fad10379a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1080,10 +1080,11 @@ if host_machine.system() == 'windows'
>      networking_dependencies += winsock
>    endif
>  else
> -  libresolv = compiler.find_library('resolv', required: false)
> -  if libresolv.found()
> -    networking_dependencies += libresolv
> -  endif
> +  networking_dependencies += [
> +    compiler.find_library('nsl', required: false),
> +    compiler.find_library('resolv', required: false),
> +    compiler.find_library('socket', required: false),
> +  ]
>  endif
>  libgit_dependencies += networking_dependencies

Fair. We could extend this check to verify which combination of
libraries we actually require to make desired functions available. But
I'm not sure whether that would really be worth the effort.

Patrick




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux