fix build for midipix
Signed-off-by: Ørjan Malde <red@foxi.me>
This commit is contained in:
parent
935182fe2b
commit
2a6cb5c881
2 changed files with 7 additions and 6 deletions
|
@ -5,7 +5,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#if defined(__linux__) && !defined(_GNU_SOURCE)
|
||||
#if defined(__linux__) || defined(__midipix__) && !defined(_GNU_SOURCE)
|
||||
/* Ensure that syscall() is available even when compiling with -std=c99 */
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
|
|
@ -151,10 +151,10 @@ void mbedtls_zeroize_and_free(void *buf, size_t len)
|
|||
#include <time.h>
|
||||
#if !defined(_WIN32) && (defined(unix) || \
|
||||
defined(__unix) || defined(__unix__) || (defined(__APPLE__) && \
|
||||
defined(__MACH__)))
|
||||
defined(__MACH__)) || defined__midipix__)
|
||||
#include <unistd.h>
|
||||
#endif /* !_WIN32 && (unix || __unix || __unix__ ||
|
||||
* (__APPLE__ && __MACH__)) */
|
||||
* (__APPLE__ && __MACH__) || __midipix__) */
|
||||
|
||||
#if !((defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L) || \
|
||||
(defined(_POSIX_THREAD_SAFE_FUNCTIONS) && \
|
||||
|
@ -222,9 +222,10 @@ void (*mbedtls_test_hook_test_fail)(const char *, int, const char *);
|
|||
#include <time.h>
|
||||
#if !defined(_WIN32) && \
|
||||
(defined(unix) || defined(__unix) || defined(__unix__) || \
|
||||
(defined(__APPLE__) && defined(__MACH__)) || defined(__HAIKU__))
|
||||
(defined(__APPLE__) && defined(__MACH__)) || defined(__HAIKU__) || defined(__midipix__))
|
||||
#include <unistd.h>
|
||||
#endif /* !_WIN32 && (unix || __unix || __unix__ || (__APPLE__ && __MACH__) || __HAIKU__) */
|
||||
#endif \
|
||||
/* !_WIN32 && (unix || __unix || __unix__ || (__APPLE__ && __MACH__) || __HAIKU__ || __midipix__) */
|
||||
#if (defined(_POSIX_VERSION) && _POSIX_VERSION >= 199309L) || defined(__HAIKU__)
|
||||
mbedtls_ms_time_t mbedtls_ms_time(void)
|
||||
{
|
||||
|
@ -232,7 +233,7 @@ mbedtls_ms_time_t mbedtls_ms_time(void)
|
|||
struct timespec tv;
|
||||
mbedtls_ms_time_t current_ms;
|
||||
|
||||
#if defined(__linux__) && defined(CLOCK_BOOTTIME)
|
||||
#if defined(__linux__) && defined(CLOCK_BOOTTIME) || defined(__midipix__)
|
||||
ret = clock_gettime(CLOCK_BOOTTIME, &tv);
|
||||
#else
|
||||
ret = clock_gettime(CLOCK_MONOTONIC, &tv);
|
||||
|
|
Loading…
Reference in a new issue