ports/132014: [PATCH] ftp/omi: fix after strndup addition/MFC, remove BROKEN tag
Florian Smeets
flo at kasimir.com
Mon Feb 23 17:10:05 UTC 2009
>Number: 132014
>Category: ports
>Synopsis: [PATCH] ftp/omi: fix after strndup addition/MFC, remove BROKEN tag
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Feb 23 17:10:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Florian Smeets
>Release: FreeBSD 7.1-STABLE amd64
>Organization:
>Environment:
System: FreeBSD mail.solomo.de 7.1-STABLE FreeBSD 7.1-STABLE #4: Mon Jan 5 22:33:23 CET
>Description:
this port was broken by the addition/MFC of strndup. With this patch it builds again.
Added file(s):
- files/patch-utils.c
- files/patch-utils.h
Port maintainer (anders at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
build on 7-STABLE >= 701101 or 8-CURRENT >= 800058 without this patch
>Fix:
use strndup function included in the port only in the cases where it's needed
--- omi-20030719.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/ftp/omi.orig/Makefile /usr/ports/ftp/omi/Makefile
--- /usr/ports/ftp/omi.orig/Makefile 2009-02-23 17:33:30.000000000 +0100
+++ /usr/ports/ftp/omi/Makefile 2009-02-23 17:33:55.000000000 +0100
@@ -33,10 +33,4 @@
${INSTALL_DATA} ${WRKSRC}/BSD-COPYRIGHT ${DOCSDIR}/
.endif
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 800058 || (${OSVERSION} >= 701101 && ${OSVERSION} < 800000)
-BROKEN= does not build
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/ftp/omi.orig/files/patch-utils.c /usr/ports/ftp/omi/files/patch-utils.c
--- /usr/ports/ftp/omi.orig/files/patch-utils.c 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/ftp/omi/files/patch-utils.c 2009-02-23 17:49:45.000000000 +0100
@@ -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)
+ {
diff -ruN --exclude=CVS /usr/ports/ftp/omi.orig/files/patch-utils.h /usr/ports/ftp/omi/files/patch-utils.h
--- /usr/ports/ftp/omi.orig/files/patch-utils.h 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/ftp/omi/files/patch-utils.h 2009-02-23 17:49:55.000000000 +0100
@@ -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 <osreldate.h>
++#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 <num>+1 bytes, even if less space would
+ * be sufficient to store <src>.
+ */
++#endif
++#endif
+
+ char *justify (char *str);
+ /*
--- omi-20030719.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list