]> git.notmuchmail.org Git - notmuch/commitdiff
Wrap the compat header in extern "C" { } when compiling C++ sources
authorTomas Carnecky <tom@dbservice.com>
Tue, 27 Apr 2010 17:27:17 +0000 (19:27 +0200)
committerCarl Worth <cworth@cworth.org>
Tue, 27 Apr 2010 17:39:54 +0000 (10:39 -0700)
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.

compat/compat.h

index 173ef680ceb8d9d9d67833fcd9db6e10ea4382aa..7767fe84a68580dbd2d2953f99645eda81403cac 100644 (file)
 #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 */