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.
This commit is contained in:
Tomas Carnecky 2010-04-27 19:27:17 +02:00 committed by Carl Worth
parent 78345c5195
commit aab54b4ce7

View file

@ -26,6 +26,10 @@
#ifndef NOTMUCH_COMPAT_H #ifndef NOTMUCH_COMPAT_H
#define NOTMUCH_COMPAT_H #define NOTMUCH_COMPAT_H
#ifdef __cplusplus
extern "C" {
#endif
#if !HAVE_GETLINE #if !HAVE_GETLINE
#include <stdio.h> #include <stdio.h>
#include <unistd.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); char* strcasestr(const char *haystack, const char *needle);
#endif /* !HAVE_STRCASESTR */ #endif /* !HAVE_STRCASESTR */
#ifdef __cplusplus
}
#endif
#endif /* NOTMUCH_COMPAT_H */ #endif /* NOTMUCH_COMPAT_H */