From d1da25f3a00ed830bd59ff03c9bc5927c6aac317 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 4 Sep 2024 17:50:43 -0500 Subject: [PATCH] These are ssize_t not size_t The return negative for error cases and with newer GHCs lying causes a problem. --- lib/Network/Protocol/TLS/GNU/Foreign.chs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Network/Protocol/TLS/GNU/Foreign.chs b/lib/Network/Protocol/TLS/GNU/Foreign.chs index 8461659..b313612 100644 --- a/lib/Network/Protocol/TLS/GNU/Foreign.chs +++ b/lib/Network/Protocol/TLS/GNU/Foreign.chs @@ -21,6 +21,7 @@ module Network.Protocol.TLS.GNU.Foreign where import Foreign import Foreign.C +import System.Posix.Types -- Type aliases {{{ @@ -224,13 +225,13 @@ foreign import ccall safe "gnutls_record_get_max_size" gnutls_record_get_max_size :: Session -> IO CSize foreign import ccall safe "gnutls_record_recv" - gnutls_record_recv :: Session -> Ptr a -> CSize -> IO CSize + gnutls_record_recv :: Session -> Ptr a -> CSize -> IO CSsize foreign import ccall safe "gnutls_record_send" - gnutls_record_send :: Session -> Ptr a -> CSize -> IO CSize + gnutls_record_send :: Session -> Ptr a -> CSize -> IO CSsize foreign import ccall safe "gnutls_record_set_max_size" - gnutls_record_set_max_size :: Session -> CSize -> IO CSize + gnutls_record_set_max_size :: Session -> CSize -> IO CSsize -- }}} -- 2.45.2