View | Details | Raw Unified | Return to bug 233736 | Differences between
and this patch

Collapse All | Expand All

(-)src/lib/torsocks.c (-1 / +7 lines)
Lines 234-242 static void init_libc_symbols(void) Link Here
234
	tsocks_libc_socket = dlsym(libc_ptr, LIBC_SOCKET_NAME_STR);
234
	tsocks_libc_socket = dlsym(libc_ptr, LIBC_SOCKET_NAME_STR);
235
	tsocks_libc_syscall = dlsym(libc_ptr, LIBC_SYSCALL_NAME_STR);
235
	tsocks_libc_syscall = dlsym(libc_ptr, LIBC_SYSCALL_NAME_STR);
236
	tsocks_libc_execve = dlsym(libc_ptr, LIBC_EXECVE_NAME_STR);
236
	tsocks_libc_execve = dlsym(libc_ptr, LIBC_EXECVE_NAME_STR);
237
#ifdef LIBC_ACCEPT4_NAME_STR
237
	tsocks_libc_accept4 = dlsym(libc_ptr, LIBC_ACCEPT4_NAME_STR);
238
	tsocks_libc_accept4 = dlsym(libc_ptr, LIBC_ACCEPT4_NAME_STR);
239
#endif
238
	if (!tsocks_libc_connect || !tsocks_libc_close || !tsocks_libc_socket ||
240
	if (!tsocks_libc_connect || !tsocks_libc_close || !tsocks_libc_socket ||
239
			!tsocks_libc_syscall || !tsocks_libc_execve || ! tsocks_libc_accept4) {
241
			!tsocks_libc_syscall || !tsocks_libc_execve
242
#ifdef LIBC_ACCEPT4_NAME_STR
243
			|| !tsocks_libc_accept4
244
#endif
245
			) {
240
		ERR("Unable to lookup symbols in " LIBC_NAME "(%s)", dlerror());
246
		ERR("Unable to lookup symbols in " LIBC_NAME "(%s)", dlerror());
241
		goto error;
247
		goto error;
242
	}
248
	}

Return to bug 233736