[MacPorts] #5746: BUG: libfetch, socklen_t not defined sometimes on Darwin 6

MacPorts noreply at macports.org
Thu Mar 24 08:26:17 PDT 2016


#5746: BUG: libfetch, socklen_t not defined sometimes on Darwin 6
-----------------------+--------------------
  Reporter:  walt@…    |      Owner:  eric@…
      Type:  defect    |     Status:  closed
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  1.0
Resolution:  fixed     |   Keywords:
      Port:  libfetch  |
-----------------------+--------------------
Changes (by ryandesign@…):

 * port:   => libfetch


Old 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$

New 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$
 }}}

--

-- 
Ticket URL: <https://trac.macports.org/ticket/5746#comment:5>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list