From ab86ef09ef03a1aadab2e54a6ff7d78bcede5efa Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Mon, 2 Mar 2026 18:21:37 -0600 Subject: [PATCH] Move declarations around for header fixes. --- src/core/util.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/core/util.h b/src/core/util.h index f137b4f6..7702b275 100644 --- a/src/core/util.h +++ b/src/core/util.h @@ -39,15 +39,6 @@ #ifndef JANET_WINDOWS #include #endif -#ifdef JANET_WINDOWS -typedef struct { - union { - OVERLAPPED overlapped; - WSAOVERLAPPED wsaoverlapped; - } as; - uint32_t bytes_transfered; -} JanetOverlapped; -#endif #endif #if !defined(JANET_REDUCED_OS) || !defined(JANET_SINGLE_THREADED) @@ -212,6 +203,21 @@ char *get_processed_name(const char *name); #define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR) #endif +#ifdef JANET_EV +#ifdef JANET_WINDOWS +#include +#include +#include +typedef struct { + union { + OVERLAPPED overlapped; + WSAOVERLAPPED wsaoverlapped; + } as; + uint32_t bytes_transfered; +} JanetOverlapped; +#endif +#endif + /* Initialize builtin libraries */ void janet_lib_io(JanetTable *env); void janet_lib_math(JanetTable *env);