diff options
| author | Eli Schwartz <eschwartz@gentoo.org> | 2025-04-25 01:25:43 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-25 09:35:55 -0700 |
| commit | 5cb05d76af33367b061aec65113de06eaa39fc71 (patch) | |
| tree | dd3679e3a9cc6b6f716cca523006c1852541477e | |
| parent | meson: do a full usage-based compile check for sysinfo (diff) | |
| download | git-5cb05d76af33367b061aec65113de06eaa39fc71.tar.gz git-5cb05d76af33367b061aec65113de06eaa39fc71.zip | |
meson: add a couple missing networking dependencies
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@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
| -rw-r--r-- | meson.build | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meson.build b/meson.build index b21b191d25..66b69f2471 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 |
