[PATCH] cleanup: Pull in <string.h> for memchr

Simon Richter <[email protected]>
Newsgroups gmane.linux.debian.devel.dpkg.general
Message-ID <[email protected]>
This needs further inspection on more systems
---
 lib/compat/strnlen.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/compat/strnlen.c b/lib/compat/strnlen.c
index d02bb4bbd..6a7eb0454 100644
--- a/lib/compat/strnlen.c
+++ b/lib/compat/strnlen.c
@@ -22,6 +22,10 @@
 
 #include "compat.h"
 
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+
 /* Find the length of STRING, but scan at most MAXLEN characters.
    If no '\0' terminator is found in that many characters, return MAXLEN.  */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.