genode/repos/libports/src/lib/jitterentropy/jitterentropy_h.patch
Josef Söntgen c407fb80fa jitterentropy: remove deprecated env() usage
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.
2017-02-23 14:54:43 +01:00

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 */