aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/lib.c11
-rw-r--r--lib/lib.h1
-rw-r--r--lib/portability.h3
3 files changed, 3 insertions, 12 deletions
diff --git a/lib/lib.c b/lib/lib.c
index 03f0a24d..11acba0d 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -1191,17 +1191,6 @@ char *next_printf(char *s, char **start)
return 0;
}
-// Posix inexplicably hasn't got this, so find str in line.
-char *strnstr(char *line, char *str)
-{
- long len = strlen(str);
- char *s;
-
- for (s = line; *s; s++) if (!strncasecmp(s, str, len)) break;
-
- return *s ? s : 0;
-}
-
int dev_minor(int dev)
{
return ((dev&0xfff00000)>>12)|(dev&0xff);
diff --git a/lib/lib.h b/lib/lib.h
index 8a45e080..14bb7cf6 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -237,7 +237,6 @@ int qstrcmp(const void *a, const void *b);
void create_uuid(char *uuid);
char *show_uuid(char *uuid);
char *next_printf(char *s, char **start);
-char *strnstr(char *line, char *str);
int dev_minor(int dev);
int dev_major(int dev);
int dev_makedev(int major, int minor);
diff --git a/lib/portability.h b/lib/portability.h
index c76beef9..59430e1b 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -88,6 +88,9 @@ char *dirname(char *path);
char *__xpg_basename(char *path);
static inline char *basename(char *path) { return __xpg_basename(path); }
+#include <string.h>
+char *strcasestr(const char *haystack, const char *needle);
+
// When building under obsolete glibc (Ubuntu 8.04-ish), hold its hand a bit.
#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 10
#define fstatat fstatat64