From 52a1a9cce1b095ffc9d723256efa9a9352d6584b Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Mon, 29 Mar 2021 09:40:41 +0100 Subject: [PATCH] Changes to OE Pal. --- src/pal/pal_open_enclave.h | 2 +- src/test/func/fixed_region/fixed_region.cc | 1 + src/test/func/two_alloc_types/alloc1.cc | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pal/pal_open_enclave.h b/src/pal/pal_open_enclave.h index bbc1096..3487d3f 100644 --- a/src/pal/pal_open_enclave.h +++ b/src/pal/pal_open_enclave.h @@ -74,7 +74,7 @@ namespace snmalloc static uint64_t get_entropy64() { uint64_t result = 0; - if (oe_random(&result, sizeof(result)) != 0) + if (oe_random(&result, sizeof(result)) != OE_OK) error("Failed to get system randomness"); return result; } diff --git a/src/test/func/fixed_region/fixed_region.cc b/src/test/func/fixed_region/fixed_region.cc index 7e77d4b..09d68ee 100644 --- a/src/test/func/fixed_region/fixed_region.cc +++ b/src/test/func/fixed_region/fixed_region.cc @@ -1,5 +1,6 @@ #define SNMALLOC_SGX #define OPEN_ENCLAVE +#define OE_OK 0 #define OPEN_ENCLAVE_SIMULATION #include #include diff --git a/src/test/func/two_alloc_types/alloc1.cc b/src/test/func/two_alloc_types/alloc1.cc index 0f3a9cb..11a3b23 100644 --- a/src/test/func/two_alloc_types/alloc1.cc +++ b/src/test/func/two_alloc_types/alloc1.cc @@ -1,5 +1,6 @@ #undef SNMALLOC_USE_LARGE_CHUNKS #define OPEN_ENCLAVE +#define OE_OK 0 #define OPEN_ENCLAVE_SIMULATION #define NO_BOOTSTRAP_ALLOCATOR #define SNMALLOC_EXPOSE_PAGEMAP