Re: building on AIX



Nerijus Baliunas wrote:
ftpfs.c: In function `ftpfs_initconn':
ftpfs.c:889: warning: passing arg 3 of `ngetsockname' from incompatible pointer type
ftpfs.c:912: warning: passing arg 3 of `ngetsockname' from incompatible pointer type
ftpfs.c: In function `ftpfs_open_data_connection':
ftpfs.c:957: warning: passing arg 3 of `naccept' from incompatible pointer type

Thanks for reporting these.

The patch is to add an AC_CHECK_TYPE(socklen_t, size_t) to configure.ac and then replace the types in all the wrong declarations with socklen_t.

Concerning socklen_t.patch:
[ ] ok to commit
[ ] needs review
[ ] rejected

Roland
Index: configure.ac
===================================================================
RCS file: /cvsroot/mc/mc/configure.ac,v
retrieving revision 1.11
diff -u -p -r1.11 configure.ac
--- configure.ac	12 Oct 2004 04:35:55 -0000	1.11
+++ configure.ac	23 Oct 2004 18:52:41 -0000
@@ -212,6 +212,7 @@ dnl 
 AC_TYPE_MODE_T
 AC_CHECK_TYPE(umode_t, int)
 AC_CHECK_TYPE(off_t, long)
+AC_CHECK_TYPE(socklen_t, size_t)
 AC_TYPE_PID_T
 AC_TYPE_UID_T
 AC_CHECK_TYPE(nlink_t, unsigned int)
Index: vfs/ftpfs.c
===================================================================
RCS file: /cvsroot/mc/mc/vfs/ftpfs.c,v
retrieving revision 1.171
diff -u -p -r1.171 ftpfs.c
--- vfs/ftpfs.c	6 Oct 2004 21:20:17 -0000	1.171
+++ vfs/ftpfs.c	23 Oct 2004 18:52:41 -0000
@@ -879,7 +879,7 @@ ftpfs_initconn (struct vfs_class *me, st
 {
     struct sockaddr_in data_addr;
     int data;
-    int len = sizeof(data_addr);
+    socklen_t len = sizeof(data_addr);
     struct protoent *pe;
 
     pe = getprotobyname ("tcp");
@@ -929,7 +929,8 @@ ftpfs_open_data_connection (struct vfs_c
 		      const char *remote, int isbinary, int reget)
 {
     struct sockaddr_in from;
-    int s, j, data, fromlen = sizeof(from);
+    int s, j, data;
+    socklen_t fromlen = sizeof(from);
     
     if ((s = ftpfs_initconn (me, super)) == -1)
         return -1;


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