Re: building on AIX



Nerijus Baliunas wrote:
While running configure I saw:
checking for socklen_t... no

I have successfully built mc on AIX, and here is the patch I wrote for it. Please try if it works for you, too.

Roland
Index: configure.ac
===================================================================
RCS file: /cvsroot/mc/mc/configure.ac,v
retrieving revision 1.13
diff -u -p -r1.13 configure.ac
--- configure.ac	27 Oct 2004 18:00:20 -0000	1.13
+++ configure.ac	1 Nov 2004 08:23:59 -0000
@@ -152,7 +152,7 @@ AC_PROG_INSTALL
 AC_CHECK_HEADERS([unistd.h string.h memory.h grp.h limits.h malloc.h \
 	stdlib.h termios.h utime.h fcntl.h pwd.h sys/statfs.h sys/time.h \
 	sys/timeb.h sys/select.h sys/ioctl.h stropts.h arpa/inet.h \
-	security/pam_misc.h])
+	security/pam_misc.h sys/socket.h])
 
 AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
@@ -212,10 +212,13 @@ dnl 
 AC_TYPE_MODE_T
 AC_CHECK_TYPE(umode_t, int)
 AC_CHECK_TYPE(off_t, long)
-AC_CHECK_TYPE(socklen_t, int)
 AC_TYPE_PID_T
 AC_TYPE_UID_T
 AC_CHECK_TYPE(nlink_t, unsigned int)
+AC_CHECK_TYPES([socklen_t],
+  AC_DEFINE([HAVE_C_TYPE_SOCKLEN_T], [1], [Define to 1 if socklen_t is defined by <sys/socket.h>]),,
+[#include <sys/types.h>
+#include <sys/socket.h>])
 
 dnl This is needed for regex.c only
 AC_CHECK_TYPE(uintptr_t,
Index: vfs/ftpfs.c
===================================================================
RCS file: /cvsroot/mc/mc/vfs/ftpfs.c,v
retrieving revision 1.172
diff -u -p -r1.172 ftpfs.c
--- vfs/ftpfs.c	27 Oct 2004 18:00:42 -0000	1.172
+++ vfs/ftpfs.c	1 Nov 2004 08:23:59 -0000
@@ -93,6 +93,9 @@ What to do with this?
 #define RFC_DARING 1
 #define RFC_STRICT 2
 
+#ifndef HAVE_C_TYPE_SOCKLEN_T
+typedef int socklen_t;
+#endif
 
 static int ftpfs_errno;
 static int code;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]