Skip to content

Commit d3926ba

Browse files
committed
lib/sockets: don't abort on systems without fcntl64 symbol
1 parent 2199377 commit d3926ba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/sockets/interpose.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,11 @@ static void init(void)
729729
libc_accept4 = bind_symbol("accept4");
730730
libc_accept = bind_symbol("accept");
731731
libc_fcntl = bind_symbol("fcntl");
732-
libc_fcntl64 = bind_symbol("fcntl64");
732+
733+
libc_fcntl64 = dlsym(RTLD_NEXT, "fcntl64");
734+
if (libc_fcntl64 == NULL)
735+
libc_fcntl64 = libc_fcntl;
736+
733737
libc_getsockopt = bind_symbol("getsockopt");
734738
libc_setsockopt = bind_symbol("setsockopt");
735739
libc_getsockname = bind_symbol("getsockname");

0 commit comments

Comments
 (0)