Skip to content

Commit 5cb05d7

Browse files
eli-schwartzgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f5e3c6c commit 5cb05d7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

meson.build

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,10 +1080,11 @@ if host_machine.system() == 'windows'
10801080
networking_dependencies += winsock
10811081
endif
10821082
else
1083-
libresolv = compiler.find_library('resolv', required: false)
1084-
if libresolv.found()
1085-
networking_dependencies += libresolv
1086-
endif
1083+
networking_dependencies += [
1084+
compiler.find_library('nsl', required: false),
1085+
compiler.find_library('resolv', required: false),
1086+
compiler.find_library('socket', required: false),
1087+
]
10871088
endif
10881089
libgit_dependencies += networking_dependencies
10891090

0 commit comments

Comments
 (0)