Do not redefine getline(3) on version that already have it

This commit is contained in:
Baptiste Daroussin 2016-07-30 00:20:02 +00:00
parent 7c7b05f10a
commit a70268c775
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=419289

View File

@ -0,0 +1,22 @@
--- getline.c.orig 2015-12-28 06:38:39 UTC
+++ getline.c
@@ -168,7 +168,9 @@ getstr (lineptr, n, stream, terminator,
#ifndef __OpenBSD__
#ifndef __NetBSD__
-
+#if defined(__FreeBSD__)
+#include <osreldate.h>
+#if __FreeBSD_version < 900000
int
getline (lineptr, n, stream)
char **lineptr;
@@ -177,6 +179,8 @@ getline (lineptr, n, stream)
{
return getstr (lineptr, n, stream, '\n', 0);
}
+#endif
+#endif
#if defined(__FreeBSD__)
#include <osreldate.h>