Subject: pkg/22890: Fixes for misc/dgpsip under FreeBSD/Solaris
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jonathan@perkin.org.uk>
List: netbsd-bugs
Date: 09/22/2003 13:18:44
>Number: 22890
>Category: pkg
>Synopsis: Fixes for misc/dgpsip under FreeBSD/Solaris
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 22 13:19:00 UTC 2003
>Closed-Date:
>Last-Modified:
>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:
This package requires extra socket libraries on Solaris. A patch for
configure.in has been sent to the maintainer to fix this in later
versions.
Bring in changes from the current release (1.32) which includes another
required Solaris fix (INADDR_NONE), and also include a fix for FreeBSD
2.1.5 machines in case this is useful to anyone running pkgsrc.
An upgrade to the latest version is anticipated once released so that
this patch is no longer needed.
Build tested on SunOS 5.9/sparc and NetBSD 1.6ZC/sparc64. Lack of
hardware prevents full application testing.
>How-To-Repeat:
===> Building for dgpsip-1.28
/home/jonp/pkg/gcc-3.3/bin/gcc -DHAVE_CONFIG_H -I. -I. -I. -O -c dgpsip.c
dgpsip.c: In function `tcpopen':
dgpsip.c:774: error: `INADDR_NONE' undeclared (first use in this function)
dgpsip.c:774: error: (Each undeclared identifier is reported only once
dgpsip.c:774: 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 dgpsip dgpsip.o nmea.o rtcm.o statusmsg.o -lm
Undefined first referenced
symbol in file
socket dgpsip.o
gethostbyname dgpsip.o
getservent dgpsip.o
getservbyname dgpsip.o
gethostbyaddr dgpsip.o
inet_addr dgpsip.o
herror dgpsip.o
connect dgpsip.o
ld: fatal: Symbol referencing errors. No output written to dgpsip
collect2: ld returned 1 exit status
*** Error code 1
>Fix:
http://www.perkin.org.uk/projects/netbsd/dgpsip.diff
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/misc/dgpsip/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile 2001/02/17 18:08:57 1.2
+++ Makefile 2003/09/22 13:11:07
@@ -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/dgpsip/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo 2001/04/20 13:52:10 1.2
+++ distinfo 2003/09/22 13:11:07
@@ -2,3 +2,4 @@
SHA1 (dgpsip-1.28.tar.gz) = e646fa8dfcb93a33cf374de00ba222c7499dde6a
Size (dgpsip-1.28.tar.gz) = 63830 bytes
+SHA1 (patch-aa) = 21a3f1b076fd5bca27edec47322c2321ae378250
--- /dev/null Mon Sep 22 14:01:13 2003
+++ patches/patch-aa Mon Sep 22 14:09:54 2003
@@ -1,0 +1,19 @@
+$NetBSD$
+
+--- dgpsip.c.orig Wed Aug 25 20:20:19 1999
++++ dgpsip.c Mon Sep 22 14:09:26 2003
+@@ -79,6 +79,14 @@
+ #define BUFSZ (4 * 1024)
+ #define NMEABUFSZ (4 * 1024)
+
++#ifndef AF_INET6 /* for freebsd 2.1.5 */
++#define AF_INET6 0x6666 /* IP version 6 */
++#endif
++
++#ifndef INADDR_NONE /* for solaris 5.7 */
++#define INADDR_NONE 0xffffffff
++#endif
++
+ int verbose = 0;
+
+ void usage(void);
>Release-Note:
>Audit-Trail:
>Unformatted: