From 0bbfe33ba967124fbd8f37a8c88c7fa65e592b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98rjan=20Malde?= Date: Thu, 14 Sep 2023 18:00:27 +0200 Subject: [PATCH] midipix support (#1315) --- configure.ac | 2 +- .../randombytes/internal/randombytes_internal_random.c | 2 ++ src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2fec5b5a..c5234928 100644 --- a/configure.ac +++ b/configure.ac @@ -712,7 +712,7 @@ AS_IF([test "$enable_asm" != "no"],[ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[ #if defined(__amd64) || defined(__amd64__) || defined(__x86_64__) -# if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64) +# if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64) || defined(__midipix__) # error Windows x86_64 calling conventions are not supported yet # endif /* neat */ diff --git a/src/libsodium/randombytes/internal/randombytes_internal_random.c b/src/libsodium/randombytes/internal/randombytes_internal_random.c index cd9681c9..ecb7c08a 100644 --- a/src/libsodium/randombytes/internal/randombytes_internal_random.c +++ b/src/libsodium/randombytes/internal/randombytes_internal_random.c @@ -32,6 +32,8 @@ # define HAVE_LINUX_COMPATIBLE_GETRANDOM # endif # endif +#elif defined(__midipix__) +# define HAVE_LINUX_COMPATIBLE_GETRANDOM #elif defined(__FreeBSD__) # include # if defined(__FreeBSD_version) && __FreeBSD_version >= 1200000 diff --git a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c index ed1ebee0..325f9bab 100644 --- a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +++ b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c @@ -30,6 +30,8 @@ # define HAVE_LINUX_COMPATIBLE_GETRANDOM # endif # endif +#elif defined(__midipix__) +# define HAVE_LINUX_COMPATIBLE_GETRANDOM #elif defined(__FreeBSD__) || defined(__DragonFly__) # include # if (defined(__FreeBSD_version) && __FreeBSD_version >= 1200000) || \