This change introduces a Genode specific init function, which sets the backend allocator used by jent_zalloc/zfree(). As consequence the library can solely be used by native Genode components, direct libc usage is not supported. Fixes #2274.
32 lines
604 B
Diff
32 lines
604 B
Diff
--- 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 */
|