This is needed when trying to use the module from a C++ program,
otherwise we end up with:

  error: undefined reference to 'mkancesdirs(char*, savewd*, int (*)(char 
const*, char const*, void*), void*)'

ChangeLog:

        mkancesdirs: Add extern "C" to header
        * lib/mkancesdirs.h: Add extern "C".
---
 lib/mkancesdirs.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/mkancesdirs.h b/lib/mkancesdirs.h
index 5f7b2d6..fdfd654 100644
--- a/lib/mkancesdirs.h
+++ b/lib/mkancesdirs.h
@@ -1,4 +1,13 @@
 #include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct savewd;
 ptrdiff_t mkancesdirs (char *, struct savewd *,
                        int (*) (char const *, char const *, void *), void *);
+
+#ifdef __cplusplus
+}
+#endif
-- 
2.7.4


Reply via email to