1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
--- eperl_parse.c.orig 1998-07-10 07:50:48 UTC
+++ eperl_parse.c
@@ -298,6 +298,7 @@ char *strnchr(char *buf, char chr, int n)
return NULL;
}
+#ifdef NOTDEF
char *strnstr(char *buf, char *str, int n)
{
char *cp;
@@ -311,6 +312,7 @@ char *strnstr(char *buf, char *str, int n)
}
return NULL;
}
+#endif
char *strncasestr(char *buf, char *str, int n)
{
@@ -326,6 +328,9 @@ char *strncasestr(char *buf, char *str, int n)
return NULL;
}
+#if defined(__FreeBSD__)
+#include <osreldate.h>
+#if __FreeBSD_version <= 800057 && __FreeBSD_version > 800000 || __FreeBSD_version <= 701100
char *strndup(char *buf, int n)
{
char *cp;
@@ -334,7 +339,8 @@ char *strndup(char *buf, int n)
strncpy(cp, buf, n);
return cp;
}
-
+#endif
+#endif
/*
** convert buffer from bristled format to plain format
|