From 3da8412cc7ddddba2c66f8b17860ac4ffbe78f0f Mon Sep 17 00:00:00 2001 From: taras Date: Mon, 7 Oct 2024 00:41:09 +0200 Subject: [PATCH] Attempt to fix Macos build --- picows/picows.pyx | 2 +- picows/picows_compat.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/picows/picows.pyx b/picows/picows.pyx index 75eba85..893bd32 100644 --- a/picows/picows.pyx +++ b/picows/picows.pyx @@ -50,7 +50,7 @@ cdef extern from "picows_compat.h" nogil: cdef ssize_t PICOWS_SOCKET_ERROR int picows_get_errno() double picows_get_monotonic_time() - ssize_t send(int sockfd, const void* buf, size_t len, int flags); + ssize_t send(int sockfd, const void* buf, size_t len, int flags) class WSError(RuntimeError): diff --git a/picows/picows_compat.h b/picows/picows_compat.h index 81e1927..327cb59 100644 --- a/picows/picows_compat.h +++ b/picows/picows_compat.h @@ -120,6 +120,6 @@ { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); - return ts.tv_sec + ts.tv_nsec / 1e9; + return (double)ts.tv_sec + (double)ts.tv_nsec / 1e9; } #endif