From: Tomas Carnecky Date: Tue, 27 Apr 2010 17:27:17 +0000 (+0200) Subject: Wrap the compat header in extern "C" { } when compiling C++ sources X-Git-Tag: 0.4~155 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=aab54b4ce752b16725399d1543602ef3f7736c91 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. --- diff --git a/compat/compat.h b/compat/compat.h index 173ef680..7767fe84 100644 --- a/compat/compat.h +++ b/compat/compat.h @@ -26,6 +26,10 @@ #ifndef NOTMUCH_COMPAT_H #define NOTMUCH_COMPAT_H +#ifdef __cplusplus +extern "C" { +#endif + #if !HAVE_GETLINE #include #include @@ -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 */