Wrap the compat header in extern "C" { } when compiling C++ sources

This fixes a build error on OpenSolaris where the final liking of
notmuch fails because the linker can't find strcasestr() referenced
from thread.cc.
(cherry picked from commit aab54b4ce7)
This commit is contained in:
Tomas Carnecky 2010-04-27 19:27:17 +02:00 committed by Carl Worth
parent 8fe3ee6f27
commit 4b193950a9

View file

@ -26,6 +26,10 @@
#ifndef NOTMUCH_COMPAT_H
#define NOTMUCH_COMPAT_H
#ifdef __cplusplus
extern "C" {
#endif
#if !HAVE_GETLINE
#include <stdio.h>
#include <unistd.h>
@ -42,4 +46,8 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp);
char* strcasestr(const char *haystack, const char *needle);
#endif /* !HAVE_STRCASESTR */
#ifdef __cplusplus
}
#endif
#endif /* NOTMUCH_COMPAT_H */