From 7bf3dc47fd0d25503e68e0c0e2753a1e62bfa105 Mon Sep 17 00:00:00 2001 From: Andrew Innes Date: Fri, 29 Jul 2022 16:01:39 +0800 Subject: [PATCH] Defines needed for btree-test --- include/os/windows/spl/sys/types.h | 3 +++ lib/libspl/include/os/windows/sys/types.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/include/os/windows/spl/sys/types.h b/include/os/windows/spl/sys/types.h index 40cb9b22a3a4..4edfbf88cc0c 100644 --- a/include/os/windows/spl/sys/types.h +++ b/include/os/windows/spl/sys/types.h @@ -156,6 +156,9 @@ typedef uintptr_t pc_t; #define strtok_r strtok_s #define strcasecmp _stricmp +#define srandom(x) srand(x) +#define random() rand() + struct mount; typedef struct mount mount_t; diff --git a/lib/libspl/include/os/windows/sys/types.h b/lib/libspl/include/os/windows/sys/types.h index 48e68bb09726..9ac75b685980 100644 --- a/lib/libspl/include/os/windows/sys/types.h +++ b/lib/libspl/include/os/windows/sys/types.h @@ -190,6 +190,7 @@ int posix_memalign(void **memptr, size_t alignment, size_t size); #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #define howmany(x, y) ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1)) +#define RLIMIT_CORE 4 /* core file size */ #define RLIMIT_NOFILE 8 /* number of open files */ typedef uint64_t rlim_t; struct rlimit { @@ -205,6 +206,9 @@ struct rlimit { #define strcasecmp _stricmp +#define srandom(x) srand(x) +#define random() rand() + int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); #include