summaryrefslogtreecommitdiff
path: root/t1utils/memmem-decl.patch
blob: 8e0e25dc1aec1e473376ed38383793a89b5e377e (plain)
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
From 3f1ddda424353f0f926dd28efa47b0ac61556ce8 Mon Sep 17 00:00:00 2001
From: Eddie Kohler <ekohler@gmail.com>
Date: Wed, 16 Aug 2017 12:37:34 -0400
Subject: [PATCH] Check for memmem declaration; sometimes it is not declared by
 default.

---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 5b4e3ff..b4dc4fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,7 @@ dnl strerror()?
 dnl
 
 AC_REPLACE_FUNCS([strerror memmem])
+AC_CHECK_DECLS([memmem])
 
 
 dnl
@@ -88,7 +89,7 @@ char* strerror(int errno);
 #endif
 
 /* Prototype memmem if we don't have it. */
-#if !HAVE_MEMMEM
+#if !HAVE_MEMMEM || !HAVE_DECL_MEMMEM
 void* memmem(const void* haystack, size_t haystack_len,
              const void* needle, size_t needle_len);
 #endif