NeoM - 2007-06-09

i try to compile tsocks 1.8beta5 on openbsd 4.0-stable/i386

* first, need to disable libdl with this patch
(openbsd doesn't need this flag to use dlsym functions)
---   Sat Jun  9 14:28:29 2007
+++        Sat Jun  9 14:28:44 2007
@@ -122,7 +122,7 @@ LIBS=

dnl Checks for libraries.
dnl Replace `main' with a function in -ldl:
-AC_CHECK_LIB(dl, dlsym,,AC_MSG_ERROR("libdl is required"))
+#AC_CHECK_LIB(dl, dlsym,,AC_MSG_ERROR("libdl is required"))

dnl If we're using gcc here define _GNU_SOURCE
AC_MSG_CHECKING("for RTLD_NEXT from dlfcn.h")

after you need to rerun autoconf (2.59 it seems)

* next configure fails here
checking "for RTLD_NEXT from dlfcn.h"... yes
checking for correct select prototype... select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct tim)
checking for correct connect prototype... configure: error: "no match found!"
*** Error code 1

there are compile error of conftest.c as to use
#include <sys/socket.h>
you need before on openbsd (i believe other bsd too)
#include <sys/types.h>

* next
checking for correct connect prototype... connect(int __fd, const struct sockaddr * __addr, socklen_t __len)
checking for correct close prototype... close(int fd)
checking for correct poll prototype... configure: error: no match found!
*** Error code 1

i don't understand how it is test. the error seems normal

configure:2233: cc -c -O2 -pipe -Wall  conftest.c 1>&5
configure:2226: error: conflicting types for `poll'
/usr/include/sys/poll.h:57: error: previous declaration of `poll'
configure: failed program was:
#line 2223 "configure"
#include "confdefs.h"

      #include <sys/poll.h>
      int poll(struct pollfd *ufds, unsigned long nfds, int timeout);
int main() {
; return 0; }

from config.log

ideas/comments ?