mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 13:25:42 +01:00
Add support for midipix, a POSIX layer for Microsoft Windows
Signed-off-by: Ørjan Malde <orjan.malde@foxi.me>
This commit is contained in:
parent
5eae4dd08e
commit
479d8de31d
2
ChangeLog.d/midipix-support.txt
Normal file
2
ChangeLog.d/midipix-support.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Features
|
||||||
|
* Add support for midipix, a POSIX layer for Microsoft Windows.
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#if !defined(unix) && !defined(__unix__) && !defined(__unix) && \
|
#if !defined(unix) && !defined(__unix__) && !defined(__unix) && \
|
||||||
!defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \
|
!defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \
|
||||||
!defined(__HAIKU__)
|
!defined(__HAIKU__) && !defined(__midipix__)
|
||||||
#error "Platform entropy sources only work on Unix and Windows, see MBEDTLS_NO_PLATFORM_ENTROPY in config.h"
|
#error "Platform entropy sources only work on Unix and Windows, see MBEDTLS_NO_PLATFORM_ENTROPY in config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ int mbedtls_platform_entropy_poll( void *data, unsigned char *output, size_t len
|
|||||||
* Since there is no wrapper in the libc yet, use the generic syscall wrapper
|
* Since there is no wrapper in the libc yet, use the generic syscall wrapper
|
||||||
* available in GNU libc and compatible libc's (eg uClibc).
|
* available in GNU libc and compatible libc's (eg uClibc).
|
||||||
*/
|
*/
|
||||||
#if defined(__linux__) && defined(__GLIBC__)
|
#if ((defined(__linux__) && defined(__GLIBC__)) || defined(__midipix__))
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#if defined(SYS_getrandom)
|
#if defined(SYS_getrandom)
|
||||||
@ -113,7 +113,7 @@ static int getrandom_wrapper( void *buf, size_t buflen, unsigned int flags )
|
|||||||
return( syscall( SYS_getrandom, buf, buflen, flags ) );
|
return( syscall( SYS_getrandom, buf, buflen, flags ) );
|
||||||
}
|
}
|
||||||
#endif /* SYS_getrandom */
|
#endif /* SYS_getrandom */
|
||||||
#endif /* __linux__ */
|
#endif /* __linux__ || __midipix__ */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#if !defined(unix) && !defined(__unix__) && !defined(__unix) && \
|
#if !defined(unix) && !defined(__unix__) && !defined(__unix) && \
|
||||||
!defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \
|
!defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \
|
||||||
!defined(__HAIKU__)
|
!defined(__HAIKU__) && !defined(__midipix__)
|
||||||
#error "This module only works on Unix and Windows, see MBEDTLS_NET_C in config.h"
|
#error "This module only works on Unix and Windows, see MBEDTLS_NET_C in config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
#if !defined(unix) && !defined(__unix__) && !defined(__unix) && \
|
#if !defined(unix) && !defined(__unix__) && !defined(__unix) && \
|
||||||
!defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \
|
!defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \
|
||||||
!defined(__HAIKU__)
|
!defined(__HAIKU__) && !defined(__midipix__)
|
||||||
#error "This module only works on Unix and Windows, see MBEDTLS_TIMING_C in config.h"
|
#error "This module only works on Unix and Windows, see MBEDTLS_TIMING_C in config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user