- Fix build after strndup(3) MFC
PR: ports/132014 Submitted by: Florian Smeets <flo at kasimir.com> Approved by: maintainer timeout (1 month)
This commit is contained in:
parent
4bc5b55a25
commit
4f810983a2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=230591
@ -33,10 +33,4 @@ do-install:
|
||||
${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>
|
||||
|
21
ftp/omi/files/patch-utils.c
Normal file
21
ftp/omi/files/patch-utils.c
Normal file
@ -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)
|
||||
{
|
21
ftp/omi/files/patch-utils.h
Normal file
21
ftp/omi/files/patch-utils.h
Normal file
@ -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);
|
||||
/*
|
Loading…
Reference in New Issue
Block a user