Opened 18 years ago

Closed 18 years ago

Last modified 8 years ago

#5746 closed defect (fixed)

BUG: libfetch, socklen_t not defined sometimes on Darwin 6

Reported by: walt@… Owned by: eric@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port: libfetch

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Under Darwin 6 the socklen_t type apparently doesn't get defined by the inclusion of <sys/socket.h> as it is on later systems. I did the following to make libfetch install, after which fetch installed and seemed to function.

bash-2.05a$ cd
/opt/local/var/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate_dports/net/libfetch/

bash-2.05a$ ls
Portfile       Portfile.orig  files

bash-2.05a$ diff -u Portfile.orig Portfile
--- Portfile.orig       Mon May 17 18:58:28 2004
+++ Portfile    Mon Nov 14 22:09:20 2005
@@ -11,7 +11,7 @@
 use_bzip2      yes
 master_sites   opendarwin
 checksums      md5 81e390ad3bf8309f65c923a0c034e841
-patchfiles     patch-Makefile patch-http.c
+patchfiles     patch-Makefile patch-ftp.c patch-http.c
 build.type     bsd
 worksrcdir     ${portname}
 use_configure  no

bash-2.05a$ cd files/
bash-2.05a$ ls
patch-Makefile patch-ftp.c    patch-http.c
bash-2.05a$ cat patch-ftp.c  
--- ftp.c.orig  Mon Nov 14 21:51:10 2005
+++ ftp.c       Mon Nov 14 21:53:36 2005
@@ -60,6 +60,11 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 
+/* define socklen_t for systems, aka Jaguar, that don't define it */
+#ifndef socklen_t
+typedef int     socklen_t;
+#endif
+
 #include <ctype.h>
 #include <err.h>
 #include <errno.h>
bash-2.05a$

Change History (5)

comment:1 Changed 18 years ago by mww@…

Owner: changed from darwinports-bugs@… to eric@…
Summary: socklen_t not defined sometimesBUG: libfetch, socklen_t not defined sometimes

comment:2 Changed 18 years ago by markd@…

Cc: eric@… markd@… added

Eric, have you seen this patch? It would be nice to get an up or down vote to clear out the bug.

comment:3 Changed 18 years ago by markd@…

Summary: BUG: libfetch, socklen_t not defined sometimesBUG: libfetch, socklen_t not defined sometimes on Darwin 6

comment:4 Changed 18 years ago by markd@…

Cc: eric@… markd@… removed
Resolution: fixed
Status: newclosed

Committed patch that is applied for darwin 6 only.

comment:5 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Port: libfetch added
Note: See TracTickets for help on using tickets.