summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorIngo Weinhold <ingo_weinhold@gmx.de>2013-03-30 12:02:13 +0000
committerIngo Weinhold <ingo_weinhold@gmx.de>2013-04-02 12:39:22 +0000
commit0470c81c6861ed3dca39051588805bde4bec0c31 (patch)
tree581ca1d879fb89aa3b7a4f6d6326750ca16c5292 /src/util.h
parent9fc09488ea869798c2a08d301bea5de45076f21a (diff)
downloadlibsolv-0470c81c6861ed3dca39051588805bde4bec0c31.tar.gz
libsolv-0470c81c6861ed3dca39051588805bde4bec0c31.tar.bz2
libsolv-0470c81c6861ed3dca39051588805bde4bec0c31.zip
Make all public libsolv headers C++ safe
A few headers already included 'export "C"' blocks, also wrapping other #include's. This patch cleanly wraps the contents of all public headers instead.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index fcb92c2..82ad777 100644
--- a/src/util.h
+++ b/src/util.h
@@ -16,6 +16,10 @@
#include <stddef.h>
#include <string.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* malloc
* exits with error message on error
@@ -82,4 +86,9 @@ static inline void *solv_calloc_block(size_t len, size_t size, size_t block)
memset(buf, 0, ((len + block) & ~block) * size);
return buf;
}
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* LIBSOLV_UTIL_H */