Subject: pkg/36791: pkgtools/pbulk cannot be built on Linux
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <cheusov@tut.by>
List: pkgsrc-bugs
Date: 08/16/2007 08:35:00
>Number:         36791
>Category:       pkg
>Synopsis:       pkgtools/pbulk cannot be built on Linux
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 16 08:35:00 +0000 2007
>Originator:     Aleksey Cheusov
>Release:        Linux/Debian 4.0
>Organization:
home
>Environment:
Linux syn-proc4 2.6.18-4-vserver-686 #1 SMP Thu May 10 01:37:59 UTC 2007 i686 GNU/Linux

>Description:
===> Building for pbulk-0.12
all ===> lib
gcc -O2 -D_GNU_SOURCE -I/usr/pkg_bulk/include  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual -Wpointer-arith -Wwrite-strings -Wswitch -Wshadow -Werror  -I/tmp/pkg_bulk_work/pkgtools/pbulk/work/libnbcompat -I/usr/pkg_bulk/include  -c netaddr.c
netaddr.c: In function 'parse_sockaddr_in':
netaddr.c:75: error: 'struct sockaddr_in' has no member named 'sin_len'
*** Error code 1

Stop.
bmake: stopped in /tmp/pkg_bulk_work/pkgtools/pbulk/work/pbulk/lib
*** Error code 1

>How-To-Repeat:

>Fix:
--- files/pbulk/lib/netaddr.c   5 Aug 2007 09:03:09 -0000       1.5
+++ files/pbulk/lib/netaddr.c   16 Aug 2007 07:34:02 -0000
@@ -71,7 +71,7 @@
        addr->sin_port = htons((in_port_t)tmp);
        addr->sin_addr = in;
 #if !defined(__sun) && !defined(__hpux) && !defined(__INTERIX) && \
-    !defined(__digital__)
+    !defined(__digital__) && !defined(__linux)
        addr->sin_len = sizeof(*addr);
 #endif
        addr->sin_family = AF_INET;