]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/nolibc: Define max_align_t type
authorMarco Schlumpp <marco@unikraft.io>
Thu, 9 Feb 2023 14:27:09 +0000 (15:27 +0100)
committerUnikraft <monkey@unikraft.io>
Tue, 25 Apr 2023 20:38:09 +0000 (20:38 +0000)
Every scalar type has an alignment requirement that is less than or
equal the alignment requirement of this type.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Andra Paraschiv <andra@unikraft.io>
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #757

lib/nolibc/include/nolibc-internal/shareddefs.h
lib/nolibc/include/stddef.h

index 51fc504c07cd68fbc12a42336c165ff65ff9efc4..15eb4771d0f626c65b0d27957099ef0964ee2c70 100644 (file)
@@ -79,6 +79,15 @@ typedef unsigned gid_t;
 #define __DEFINED_gid_t
 #endif
 
+#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
+typedef struct {
+       long long __longlongf;
+
+       long double __longdoublef;
+} max_align_t;
+#define __DEFINED_max_align_t
+#endif
+
 #if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
 typedef unsigned useconds_t;
 #define __DEFINED_useconds_t
index 5abede76652b5de2695d027669bd9fd907aa7e29..b8e4b0c7b58e2445fb1fe4ff02e3f04909dd1b2d 100644 (file)
@@ -48,6 +48,7 @@ typedef __sptr ptrdiff_t;
 
 #define __NEED_NULL
 #define __NEED_size_t
+#define __NEED_max_align_t
 #include <nolibc-internal/shareddefs.h>
 
 #ifdef __cplusplus