NetBSD Problem Report #22889
Received: (qmail 1823 invoked by uid 605); 22 Sep 2003 12:18:51 -0000
Message-Id: <20030922121850.5EB1411152@narn.netbsd.org>
Date: Mon, 22 Sep 2003 12:18:50 +0000 (UTC)
From: jonathan@perkin.org.uk
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: jonathan@perkin.org.uk
To: gnats-bugs@gnats.NetBSD.org
Subject: Fix build of misc/cstream on Solaris
X-Send-Pr-Version: www-1.0
>Number: 22889
>Category: pkg
>Synopsis: Fix build of misc/cstream on Solaris
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 22 12:19:00 +0000 2003
>Closed-Date: Mon Sep 22 12:31:03 +0000 2003
>Last-Modified: Mon Sep 22 13:22:00 +0000 2003
>Originator: Jonathan Perkin
>Release: N/A
>Organization:
British Broadcasting Corporation
>Environment:
SunOS build1 5.9 Generic_112233-01 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
>Description:
Solaris needs the usual network libraries to get this to compile, plus
a compatability define for the missing INADDR_NONE
>How-To-Repeat:
===> Building for cstream-2.2
Making all in auxdir
Making all in tests
/home/jonp/pkg/gcc-3.3/bin/gcc -DPACKAGE=\"cstream\" -DVERSION=\"2.2\" -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_SOCKLEN_T=1 -DRETSIGTYPE=void -DHAVE_GETTIMEOFDAY=1 -DHAVE_MKFIFO=1 -DHAVE_STRDUP=1 -I. -I. -O -c cstream.c
cstream.c: In function `open_tcp':
cstream.c:325: error: `INADDR_NONE' undeclared (first use in this function)
cstream.c:325: error: (Each undeclared identifier is reported only once
cstream.c:325: error: for each function it appears in.)
*** Error code 1
[...]
/home/jonp/pkg/gcc-3.3/bin/gcc -O -Wl,-R/home/jonp/bulk/pkg/lib -L/home/jonp/bulk/pkg/lib -o cstream cstream.o -lm
Undefined first referenced
symbol in file
socket cstream.o
gethostbyname cstream.o
accept cstream.o
bind cstream.o
inet_addr cstream.o
herror cstream.o
listen cstream.o
connect cstream.o
ld: fatal: Symbol referencing errors. No output written to cstream
collect2: ld returned 1 exit status
*** Error code 1
>Fix:
http://www.perkin.org.uk/projects/netbsd/cstream.diff
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/misc/cstream/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile 2003/07/17 21:48:51 1.3
+++ Makefile 2003/09/22 12:15:50
@@ -10,4 +10,10 @@
GNU_CONFIGURE= yes
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+LDFLAGS+= -lsocket -lnsl -lresolv
+.endif
+
.include "../../mk/bsd.pkg.mk"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/misc/cstream/distinfo,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 distinfo
--- distinfo 2001/09/19 05:24:27 1.1.1.1
+++ distinfo 2003/09/22 12:15:50
@@ -2,3 +2,4 @@
SHA1 (cstream-2.2.tar.gz) = aef89176123f1ae6cb824e66b2e9b3aa3be7644e
Size (cstream-2.2.tar.gz) = 43124 bytes
+SHA1 (patch-aa) = f531a2cc1a7736930cc74d2200c9a7ea305db971
--- /dev/null Mon Sep 22 13:15:51 2003
+++ patches/patch-aa Mon Sep 22 13:12:03 2003
@@ -1,0 +1,16 @@
+$NetBSD$
+
+--- cstream.c.orig Wed Jul 11 16:13:05 2001
++++ cstream.c Mon Sep 22 13:11:17 2003
+@@ -71,6 +71,11 @@
+ #endif
+ #endif /* HAVE_POLL_H */
+
++/* Solaris needs this */
++#ifndef INADDR_NONE
++#define INADDR_NONE 0xffffffff
++#endif
++
+ #ifndef NOSOUND
+ #ifdef HAVE_MACHINE_SOUNDCARD_H
+ #include <machine/soundcard.h>
>Release-Note:
>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: jonathan@perkin.org.uk
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: pkg/22889: Fix build of misc/cstream on Solaris
Date: Mon, 22 Sep 2003 14:23:05 +0200
On Mon, Sep 22, 2003 at 12:18:50PM +0000, jonathan@perkin.org.uk wrote:
> +--- cstream.c.orig Wed Jul 11 16:13:05 2001
> ++++ cstream.c Mon Sep 22 13:11:17 2003
> +@@ -71,6 +71,11 @@
> + #endif
> + #endif /* HAVE_POLL_H */
> +
> ++/* Solaris needs this */
> ++#ifndef INADDR_NONE
> ++#define INADDR_NONE 0xffffffff
> ++#endif
> ++
> + #ifndef NOSOUND
> + #ifdef HAVE_MACHINE_SOUNDCARD_H
> + #include <machine/soundcard.h>
That's too early, I get:
/usr/include/netinet/in.h:212: warning: `INADDR_NONE' redefined
cstream.c:76: warning: this is the location of the previous definition
Thomas
State-Changed-From-To: open->closed
State-Changed-By: wiz
State-Changed-When: Mon Sep 22 08:30:29 EDT 2003
State-Changed-Why:
Committed a slightly different version, thanks.
Btw, please make sure that you send your patches to the authors,
and tell them to add configure checks for the missing libraries on Solaris.
Thanks.
From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/22889 CVS commit: pkgsrc/misc/cstream
Date: Mon, 22 Sep 2003 12:30:24 +0000 (UTC)
Module Name: pkgsrc
Committed By: wiz
Date: Mon Sep 22 12:30:24 UTC 2003
Modified Files:
pkgsrc/misc/cstream: Makefile distinfo
Added Files:
pkgsrc/misc/cstream/patches: patch-aa
Log Message:
Fix build on Solaris, based on PR 22889 by Jonathan Perkin.
To generate a diff of this commit:
cvs rdiff -r1.3 -r1.4 pkgsrc/misc/cstream/Makefile
cvs rdiff -r1.1.1.1 -r1.2 pkgsrc/misc/cstream/distinfo
cvs rdiff -r0 -r1.1 pkgsrc/misc/cstream/patches/patch-aa
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Jonathan Perkin <jonathan@perkin.org.uk>
To: gnats-bugs@gnats.netbsd.org
Cc: wiz@netbsd.org, pkg-manager@netbsd.org
Subject: Re: pkg/22889
Date: Mon, 22 Sep 2003 14:21:29 +0100
* On 2003-09-22 at 13:39 BST, wiz@netbsd.org wrote:
> Committed a slightly different version, thanks.
Cheers - I was just about to send you the patch you finally
committed. I'll make sure all future reports are tested on
a NetBSD box as well.
> Btw, please make sure that you send your patches to the authors,
> and tell them to add configure checks for the missing libraries on
> Solaris.
Noted, have started to do so.
Thanks,
--
Jonathan Perkin <jonathan@perkin.org.uk>
BBC Internet Services http://www.perkin.org.uk/jonathan/
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.