aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwen <wen@FreeBSD.org>2010-11-08 08:24:52 +0800
committerwen <wen@FreeBSD.org>2010-11-08 08:24:52 +0800
commit0ac95f0f90689f8f6c2a8e8a21be3429854ac934 (patch)
tree16ba31aa5d25e3c8f1a688060be1c86b79eb4622
parente919523813cc71a74c1e5112d900e00e5eb526f1 (diff)
downloadfreebsd-ports-gnome-0ac95f0f90689f8f6c2a8e8a21be3429854ac934.tar.gz
freebsd-ports-gnome-0ac95f0f90689f8f6c2a8e8a21be3429854ac934.tar.zst
freebsd-ports-gnome-0ac95f0f90689f8f6c2a8e8a21be3429854ac934.zip
- Fix the build on FreeBSD-6
Reported by: QAT@
-rw-r--r--devel/upnp/distinfo1
-rw-r--r--devel/upnp/files/extra-upnp-src-api-UpnpString.c22
2 files changed, 11 insertions, 12 deletions
diff --git a/devel/upnp/distinfo b/devel/upnp/distinfo
index 47af1cdeaff3..70cec7055945 100644
--- a/devel/upnp/distinfo
+++ b/devel/upnp/distinfo
@@ -1,3 +1,2 @@
-MD5 (libupnp-1.6.8.tar.bz2) = 7e162895b9d0f9efcccd07973012cdff
SHA256 (libupnp-1.6.8.tar.bz2) = fe05f477381e65f30337bae3cee9721932085f75b292b984fac20bbb76b81a83
SIZE (libupnp-1.6.8.tar.bz2) = 1196317
diff --git a/devel/upnp/files/extra-upnp-src-api-UpnpString.c b/devel/upnp/files/extra-upnp-src-api-UpnpString.c
index 94c2b2265d29..c71227215e5d 100644
--- a/devel/upnp/files/extra-upnp-src-api-UpnpString.c
+++ b/devel/upnp/files/extra-upnp-src-api-UpnpString.c
@@ -1,14 +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
+--- upnp/src/api/UpnpString.c.orig 2010-11-08 08:09:47.000000000 +0800
++++ upnp/src/api/UpnpString.c 2010-11-08 08:11:16.000000000 +0800
@@ -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;
+- 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;