--- a/jitterentropy.h.orig
+++ b/jitterentropy.h
@@ -42,11 +42,19 @@
 #ifndef _JITTERENTROPY_H
 #define _JITTERENTROPY_H
 
+#ifdef JITTERENTROPY_GENODE
+#include <jitterentropy-base-genode.h>
+#else
 #ifdef __KERNEL__
 #include "jitterentropy-base-kernel.h"
 #else
 #include "jitterentropy-base-user.h"
 #endif /* __KERNEL__ */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /* Statistical data from the entropy source */
 struct entropy_stat {
@@ -171,4 +179,8 @@
 
 /* -- END of statistical test function -- */
 
+#ifdef __cplusplus
+}
+#endif /* extern "C" */
+
 #endif /* _JITTERENTROPY_H */
