pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48691: www/curl hostcheck.c on DragonFly 3.7 needs netinet/in.h include for ipv6 enabled



>Number:         48691
>Category:       pkg
>Synopsis:       www/curl hostcheck.c on DragonFly 3.7 needs netinet/in.h 
>include for ipv6 enabled
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 31 01:10:00 +0000 2014
>Originator:     David Shao
>Release:        DragonFly 3.7-DEVELOPMENT
>Organization:
>Environment:
DragonFly  3.7-DEVELOPMENT DragonFly v3.7.1.988.g08ecb-DEVELOPMENT #0: Sun Mar 
30 15:22:59 PDT 2014     xxxxx@:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64

>Description:
On DragonFly 3.7-DEVELOPMENT x86_64 and i386 master through update

commit 08ecb92056444de3f12a7eb1d94f7bd4465a0431
Date:   Sun Mar 30 23:36:05 2014 +0200

    Unbreak buildworld after recent hammer2 changes.

pkgsrc cvs www/curl fails to build / replace with

mv -f .deps/libcurl_la-curl_multibyte.Tpo .deps/libcurl_la-curl_multibyte.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile cc -DHAVE_CONFIG_H   
-I../include/curl -I../include  -I../include -I../lib  -I../lib  
-DBUILDING_LIBCURL  -DCURL_HIDDEN_SYMBOLS -I/usr/pkg/include -I/usr/pkg/include 
-I/usr/include -I/usr/include -I/usr/include/openssl  -fvisibility=hidden 
-I/usr/pkg/include -I/usr/include -O2 -Wno-system-headers -MT 
libcurl_la-hostcheck.lo -MD -MP -MF .deps/libcurl_la-hostcheck.Tpo -c -o 
libcurl_la-hostcheck.lo `test -f 'hostcheck.c' || echo './'`hostcheck.c
libtool: compile:  cc -DHAVE_CONFIG_H -I../include/curl -I../include -I../lib 
-DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS 
-I/usr/pkgsrc/www/curl/work/.buildlink/include -I/usr/include/openssl 
-fvisibility=hidden -O2 -Wno-system-headers -MT libcurl_la-hostcheck.lo -MD -MP 
-MF .deps/libcurl_la-hostcheck.Tpo -c hostcheck.c  -fPIC -DPIC -o 
.libs/libcurl_la-hostcheck.o
hostcheck.c: In function 'hostmatch':
hostcheck.c:64:23: error: storage size of 'si6' isn't known
*** Error code 1

The problem does not manifest on NetBSD 6.99.36 amd64.

>How-To-Repeat:

>Fix:
si6 is declared inside

#ifdef ENABLE_IPV6
  struct sockaddr_in6 si6;
#endif

in function hostmatch() in file lib/hostcheck.c.  For whatever reason, on 
NetBSD the default includes define struct sockaddr_in6 whereas on DragonFly 
3.7-DEVELOPMENT they don't.  Other files in curl's lib/ such as connect.c 
explicitly include <netinet/in.h>.   On DragonFly 3.7-DEVELOPMENT including 
<netinet/in.h> in turn includes <netinet6/in6.h> which defines struct 
sockaddr_in6.

The following new patch file: patch-lib_hostcheck.c and
bmake makepatchsum
enabled the latest www/curl to be built and replaced on DragonFly 
3.7-DEVELOPMENT x86_64 and i386.  It might be helpful if some other BSD users 
such as for FreeBSD could provide feedback on whether generically include 
<netinet/in.h> needs to be added to hostcheck.c or whether this is a problem 
particular to DragonFly.

$NetBSD$

--- lib/hostcheck.c.orig        2014-03-31 00:40:59.430391000 +0000
+++ lib/hostcheck.c
@@ -31,6 +31,13 @@
 #include "inet_pton.h"
 
 #include "curl_memory.h"
+
+#ifdef ENABLE_IPV6
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#endif
+
 /* The last #include file should be: */
 #include "memdebug.h"



Home | Main Index | Thread Index | Old Index