[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH v2] lib/ukswrand: Guard struct uk_swrand definition



Define uk_swrand struct depending on what algorithm is used.
For now, multiply with carry is the only one.
---
 lib/ukswrand/include/uk/swrand.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/ukswrand/include/uk/swrand.h b/lib/ukswrand/include/uk/swrand.h
index 64f88f1..9a93e87 100644
--- a/lib/ukswrand/include/uk/swrand.h
+++ b/lib/ukswrand/include/uk/swrand.h
@@ -37,14 +37,18 @@
 
 #include <uk/arch/types.h>
 #include <uk/plat/lcpu.h>
+#include <uk/config.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 struct uk_swrand {
+#ifdef CONFIG_LIBUKSWRAND_MWC
         __u32 Q[4096];
         __u32 c;
         __u32 i;
+#endif
 };
 
 extern struct uk_swrand uk_swrand_def;
-- 
2.11.0


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.