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

[UNIKRAFT/NOLIBC] Added some things to make libnettle work



---
 lib/nolibc/exportsyms.uk    | 1 +
 lib/nolibc/include/stddef.h | 2 +-
 lib/nolibc/include/stdint.h | 6 ++++++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/nolibc/exportsyms.uk b/lib/nolibc/exportsyms.uk
index f283d45..7f29cb2 100644
--- a/lib/nolibc/exportsyms.uk
+++ b/lib/nolibc/exportsyms.uk
@@ -46,6 +46,7 @@ strtoll
 strtoull
 atoi
 qsort
+abort
 
 # string
 memcpy
diff --git a/lib/nolibc/include/stddef.h b/lib/nolibc/include/stddef.h
index 9fb27b1..427a5c2 100644
--- a/lib/nolibc/include/stddef.h
+++ b/lib/nolibc/include/stddef.h
@@ -45,7 +45,7 @@ extern "C" {
 typedef __sptr ptrdiff_t;
 
 #ifndef offsetof
-#define offsetof(t, d) __offsetof(t, d)
+#define offsetof(t, d) __builtin_offsetof(t, d)
 #endif
 
 #define __NEED_NULL
diff --git a/lib/nolibc/include/stdint.h b/lib/nolibc/include/stdint.h
index a6a55c4..af0a617 100644
--- a/lib/nolibc/include/stdint.h
+++ b/lib/nolibc/include/stdint.h
@@ -80,6 +80,12 @@ typedef __sptr intptr_t;
 #define INTMAX_MAX   __LL_MAX
 #define UINTMAX_MAX __ULL_MAX
 
+# if __WORDSIZE == 64
+#  define UINT64_C(c)  c ## UL
+# else
+#  define UINT64_C(c)  c ## ULL
+# endif
+
 #ifdef __cplusplus
 }
 #endif
-- 
2.25.1




 


Rackspace

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