summaryrefslogtreecommitdiff
path: root/ftp/omi/files/patch-utils.c
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2009-03-21 17:26:35 +0000
committerRong-En Fan <rafan@FreeBSD.org>2009-03-21 17:26:35 +0000
commit4f810983a2c308961f39b5e060795f92ffc997f7 (patch)
tree73ded01169a254c59a17fe0012951dd870889cf1 /ftp/omi/files/patch-utils.c
parent- Add support for Xft and UTF-8 (optional) (diff)
- Fix build after strndup(3) MFC
PR: ports/132014 Submitted by: Florian Smeets <flo at kasimir.com> Approved by: maintainer timeout (1 month)
Notes
Notes: svn path=/head/; revision=230591
Diffstat (limited to 'ftp/omi/files/patch-utils.c')
-rw-r--r--ftp/omi/files/patch-utils.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/ftp/omi/files/patch-utils.c b/ftp/omi/files/patch-utils.c
new file mode 100644
index 000000000000..15134cf604aa
--- /dev/null
+++ b/ftp/omi/files/patch-utils.c
@@ -0,0 +1,21 @@
+--- utils/utils.c.orig 2009-02-23 16:51:16.000000000 +0100
++++ utils/utils.c 2009-02-23 16:53:54.000000000 +0100
+@@ -31,6 +31,9 @@
+ return (mem);
+ }
+
++#if defined(__FreeBSD__)
++#include <osreldate.h>
++#if __FreeBSD_version <= 800057 && __FreeBSD_version > 800000 || __FreeBSD_version <= 701100
+ char *strndup (const char *src, int num)
+ {
+ char *dst;
+@@ -40,6 +43,8 @@
+ dst[num] = '\0';
+ return (strncpy(dst, src, num));
+ }
++#endif
++#endif
+
+ char *justify (char *str)
+ {