summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2019-12-11 13:22:06 +1100
committerDarren Tucker <dtucker@dtucker.net>2019-12-11 13:22:06 +1100
commitafffd310360b155df2133d1f5f1ab2f4e939b570 (patch)
treec0ee1e71b5f1ebf4d056fe110d9bda6797f9dccb /openbsd-compat
parentad8cd420797695f3b580aea1034b9de60bede9b9 (diff)
Check if memmem is declared in system headers.
If the system (or one of the dependencies) implements memmem but does not define the header, we would not declare it either resulting in compiler warnings. Check for declaration explicitly. bz#3102.
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/openbsd-compat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index afe882f92..8c97173b1 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -74,7 +74,7 @@ int getpagesize(void);
74char *getcwd(char *pt, size_t size); 74char *getcwd(char *pt, size_t size);
75#endif 75#endif
76 76
77#ifndef HAVE_MEMMEM 77#if defined(HAVE_DECL_MEMMEM) && HAVE_DECL_MEMMEM == 0
78void *memmem(const void *, size_t, const void *, size_t); 78void *memmem(const void *, size_t, const void *, size_t);
79#endif 79#endif
80 80