diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/architecture.h | 4 | ||||
-rw-r--r-- | src/shared/missing.h | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/shared/architecture.h b/src/shared/architecture.h index f1fef23cf2..cb82418a5e 100644 --- a/src/shared/architecture.h +++ b/src/shared/architecture.h @@ -133,7 +133,7 @@ int uname_architecture(void); # else # define native_architecture() ARCHITECTURE_MIPS_LE # define LIB_ARCH_TUPLE "mipsel-linux-gnu" -#endif +# endif #elif defined(__alpha__) # define native_architecture() ARCHITECTURE_ALPHA # define LIB_ARCH_TUPLE "alpha-linux-gnu" @@ -185,7 +185,7 @@ int uname_architecture(void); # define native_architecture() ARCHITECTURE_CRIS # error "Missing LIB_ARCH_TUPLE for CRIS" #else -#error "Please register your architecture here!" +# error "Please register your architecture here!" #endif const char *architecture_to_string(int a) _const_; diff --git a/src/shared/missing.h b/src/shared/missing.h index ecd32babed..8c6698cff1 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h @@ -149,6 +149,16 @@ static inline int memfd_create(const char *name, unsigned int flags) { #ifndef __NR_getrandom # if defined __x86_64__ # define __NR_getrandom 318 +# elif defined(__i386__) +# define __NR_getrandom 355 +# elif defined(__arm__) || defined(__aarch64__) +# define __NR_getrandom 384 +# elif defined(__ia64__) +# define __NR_getrandom 1339 +# elif defined(__m68k__) +# define __NR_getrandom 352 +# elif defined(__s390x__) +# define __NR_getrandom 349 # else # warning "__NR_getrandom unknown for your architecture" # define __NR_getrandom 0xffffffff |