aboutsummaryrefslogtreecommitdiff
path: root/audio/tosha/files
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2009-03-01 14:06:56 +0000
committerMartin Wilke <miwi@FreeBSD.org>2009-03-01 14:06:56 +0000
commit81c6807c61b5b6a3fbeba3aa651d4dcbbced9e28 (patch)
tree082e51c30ba627bd8f97e8ea592b20fcb39e88ff /audio/tosha/files
parent82f095602a3ba997b13ac3af79a1af8e14928530 (diff)
downloadports-81c6807c61b5b6a3fbeba3aa651d4dcbbced9e28.tar.gz
ports-81c6807c61b5b6a3fbeba3aa651d4dcbbced9e28.zip
- Unbreak after strndup MFC [1]
- Move to PLIST_FILES PR: 132067 Submitted by: Florian Smeets <flo@kasimir.com>
Notes
Notes: svn path=/head/; revision=229277
Diffstat (limited to 'audio/tosha/files')
-rw-r--r--audio/tosha/files/patch-utils.c21
-rw-r--r--audio/tosha/files/patch-utils.h21
2 files changed, 42 insertions, 0 deletions
diff --git a/audio/tosha/files/patch-utils.c b/audio/tosha/files/patch-utils.c
new file mode 100644
index 000000000000..4b34b37e9d3e
--- /dev/null
+++ b/audio/tosha/files/patch-utils.c
@@ -0,0 +1,21 @@
+--- utils.c.orig 2009-02-24 14:41:16.000000000 +0100
++++ utils.c 2009-02-24 14:41:55.000000000 +0100
+@@ -59,6 +59,9 @@
+ return (mem);
+ }
+
++#if defined(__FreeBSD__)
++#include <osreldate.h>
++#if __FreeBSD_version <= 800057 && __FreeBSD_version > 800000 || __FreeBSD_version <= 701100
+ char *strndup (char *src, int num)
+ {
+ char *dst;
+@@ -68,6 +71,8 @@
+ dst[num] = '\0';
+ return (strncpy(dst, src, num));
+ }
++#endif
++#endif
+
+ char *justify (char *str)
+ {
diff --git a/audio/tosha/files/patch-utils.h b/audio/tosha/files/patch-utils.h
new file mode 100644
index 000000000000..32b32cbee6ab
--- /dev/null
+++ b/audio/tosha/files/patch-utils.h
@@ -0,0 +1,21 @@
+--- utils.h.orig 2009-02-24 14:41:21.000000000 +0100
++++ utils.h 2009-02-24 14:42:08.000000000 +0100
+@@ -63,6 +63,9 @@
+ * allocated.
+ */
+
++#if defined(__FreeBSD__)
++#include <osreldate.h>
++#if __FreeBSD_version <= 800057 && __FreeBSD_version > 800000 || __FreeBSD_version <= 701100
+ char *strndup (char *src, int num);
+ /*
+ * Like strdup(), but limits the string length to at most
+@@ -71,6 +74,8 @@
+ * Always allocates <num>+1 bytes, even if less space would
+ * be sufficient to store <src>.
+ */
++#endif
++#endif
+
+ char *justify (char *str);
+ /*