Opened 19 years ago
Last modified 9 years ago
#5746 closed defect
socklen_t not defined sometimes — at Initial Version
Reported by: | walt@… | Owned by: | darwinports-bugs@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.0 |
Keywords: | Cc: | ||
Port: | libfetch |
Description
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$