From 4f810983a2c308961f39b5e060795f92ffc997f7 Mon Sep 17 00:00:00 2001 From: Rong-En Fan Date: Sat, 21 Mar 2009 17:26:35 +0000 Subject: - Fix build after strndup(3) MFC PR: ports/132014 Submitted by: Florian Smeets Approved by: maintainer timeout (1 month) --- ftp/omi/files/patch-utils.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ftp/omi/files/patch-utils.h (limited to 'ftp/omi/files/patch-utils.h') diff --git a/ftp/omi/files/patch-utils.h b/ftp/omi/files/patch-utils.h new file mode 100644 index 000000000000..d1cdbb0ce71a --- /dev/null +++ b/ftp/omi/files/patch-utils.h @@ -0,0 +1,21 @@ +--- utils/utils.h.orig 2009-02-23 16:51:20.000000000 +0100 ++++ utils/utils.h 2009-02-23 16:54:21.000000000 +0100 +@@ -42,6 +42,9 @@ + * allocated. + */ + ++#if defined(__FreeBSD__) ++#include ++#if __FreeBSD_version <= 800057 && __FreeBSD_version > 800000 || __FreeBSD_version <= 701100 + char *strndup (const char *src, int num); + /* + * Like strdup(), but limits the string length to at most +@@ -50,6 +53,8 @@ + * Always allocates +1 bytes, even if less space would + * be sufficient to store . + */ ++#endif ++#endif + + char *justify (char *str); + /* -- cgit v1.2.3