FreeBSD Bugzilla – Attachment 110575 Details for
Bug 151762
[maintainer] devel/upnp fix build for OSVERSION < 702000
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
upnp-1.6.8_1,1.patch
upnp-1.6.8_1,1.patch (text/plain), 1.57 KB, created by
Pawel Pekala
on 2010-10-26 21:10:09 UTC
(
hide
)
Description:
upnp-1.6.8_1,1.patch
Filename:
MIME Type:
Creator:
Pawel Pekala
Created:
2010-10-26 21:10:09 UTC
Size:
1.57 KB
patch
obsolete
>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 <bsd.port.mk> >+.include <bsd.port.pre.mk> >+ >+# strndup(3) was added in 7.2-RELEASE >+.if ${OSVERSION} < 702000 >+EXTRA_PATCHES+= ${FILESDIR}/extra-upnp-src-api-UpnpString.c >+.endif >+ >+.include <bsd.port.post.mk> >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;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 151762
: 110575