From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Oct 26 20:10:10 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84731106566B for ; Tue, 26 Oct 2010 20:10:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4441F8FC18 for ; Tue, 26 Oct 2010 20:10:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o9QKAAdr083271 for ; Tue, 26 Oct 2010 20:10:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o9QKAArW083270; Tue, 26 Oct 2010 20:10:10 GMT (envelope-from gnats) Resent-Date: Tue, 26 Oct 2010 20:10:10 GMT Resent-Message-Id: <201010262010.o9QKAArW083270@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Pawel Pekala" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B1A3106566C for ; Tue, 26 Oct 2010 20:05:42 +0000 (UTC) (envelope-from c0rn@o2.pl) Received: from moh1-ve1.go2.pl (moh1-ve2.go2.pl [193.17.41.132]) by mx1.freebsd.org (Postfix) with ESMTP id 047A88FC18 for ; Tue, 26 Oct 2010 20:05:40 +0000 (UTC) Received: from moh1-ve1.go2.pl (unknown [10.0.0.132]) by moh1-ve1.go2.pl (Postfix) with ESMTP id 3789A520063 for ; Tue, 26 Oct 2010 22:05:39 +0200 (CEST) Received: from unknown (unknown [10.0.0.142]) by moh1-ve1.go2.pl (Postfix) with SMTP for ; Tue, 26 Oct 2010 22:05:38 +0200 (CEST) Received: from aecb47.neoplus.adsl.tpnet.pl [79.186.53.47] by poczta.o2.pl with ESMTP id jEtCGK; Tue, 26 Oct 2010 22:05:38 +0200 Message-Id: <1288123692.32287@caprica.slowicza.org> Date: Tue, 26 Oct 2010 22:08:12 +0200 From: "Pawel Pekala" To: "FreeBSD gnats submit" X-Send-Pr-Version: gtk-send-pr 0.4.9 Cc: Subject: ports/151762: [maintainer] devel/upnp fix build for OSVERSION < 702000 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2010 20:10:10 -0000 >Number: 151762 >Category: ports >Synopsis: [maintainer] devel/upnp fix build for OSVERSION < 702000 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue Oct 26 20:10:09 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Pawel Pekala >Release: FreeBSD 8.1-RELEASE i386 >Organization: >Environment: System: FreeBSD 8.1-RELEASE #2: Sat Aug 21 18:46:54 CEST 2010 corn@caprica.slowicza.org:/usr/obj/usr/src/sys/GENERIC >Description: - fix build for OSVERSION < 702000 >How-To-Repeat: >Fix: --- upnp-1.6.8_1,1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/devel/upnp/Makefile /home/corn/devel/upnp/Makefile --- /usr/ports/devel/upnp/Makefile 2010-10-22 17:40:40.000000000 +0200 +++ /home/corn/devel/upnp/Makefile 2010-10-26 22:04:57.000000000 +0200 @@ -7,6 +7,7 @@ PORTNAME= upnp PORTVERSION= 1.6.8 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= devel MASTER_SITES= SF/p${PORTNAME}/p${PORTNAME}/libUPnP%20${PORTVERSION} @@ -38,4 +39,11 @@ ${REINPLACE_CMD} '/^pkgconfigexecdir/s|$$(libdir)|$$(prefix)/libdata|' \ ${WRKSRC}/Makefile.in -.include +.include + +# strndup(3) was added in 7.2-RELEASE +.if ${OSVERSION} < 702000 +EXTRA_PATCHES+= ${FILESDIR}/extra-upnp-src-api-UpnpString.c +.endif + +.include diff -ruN --exclude=CVS /usr/ports/devel/upnp/files/extra-upnp-src-api-UpnpString.c /home/corn/devel/upnp/files/extra-upnp-src-api-UpnpString.c --- /usr/ports/devel/upnp/files/extra-upnp-src-api-UpnpString.c 1970-01-01 01:00:00.000000000 +0100 +++ /home/corn/devel/upnp/files/extra-upnp-src-api-UpnpString.c 2010-10-26 21:54:55.000000000 +0200 @@ -0,0 +1,14 @@ +--- upnp/src/api/UpnpString.c.orig 2010-10-26 21:46:15.000000000 +0200 ++++ upnp/src/api/UpnpString.c 2010-10-26 21:51:47.000000000 +0200 +@@ -165,8 +165,10 @@ + + int UpnpString_set_StringN(UpnpString *p, const char *s, size_t n) + { +- char *q = strndup(s, n); ++ char *q = malloc(n+1); + if (!q) goto error_handler1; ++ strncpy(q, s, n); ++ q[n-1] = '\0'; + free(((struct SUpnpString *)p)->m_string); + ((struct SUpnpString *)p)->m_length = strlen(q); + ((struct SUpnpString *)p)->m_string = q; --- upnp-1.6.8_1,1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: