[glib-networking/fix.openssl.x64.win: 1/2] gtlsbackend-openssl.c: Fix x64 Windows builds



commit fbdb32785853b4d171ce60c78e4d4b881fa407e4
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Jan 1 13:11:50 2020 +0800

    gtlsbackend-openssl.c: Fix x64 Windows builds
    
    We really want to avoid C4311 warnings on Visual Studio x64 builds, as
    this is often a source of problems (crashes, especially) on x64 builds
    of anything.
    
    This is caused by sizeof (unsigned long) == 4 even on x64 builds on
    Windows, so we replace it with size_t instead.

 tls/openssl/gtlsbackend-openssl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tls/openssl/gtlsbackend-openssl.c b/tls/openssl/gtlsbackend-openssl.c
index 81e5138..87248cc 100644
--- a/tls/openssl/gtlsbackend-openssl.c
+++ b/tls/openssl/gtlsbackend-openssl.c
@@ -62,10 +62,10 @@ struct CRYPTO_dynlock_value {
 #pragma GCC diagnostic ignored "-Wunused-function"
 #endif
 
-static unsigned long
+static size_t
 id_cb (void)
 {
-  return (unsigned long) g_thread_self ();
+  return (size_t) g_thread_self ();
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]