[libsoup] websockets: fix 32-bit build



commit d5b3023038c999341f44e686f48ba0eb976ba485
Author: Dan Winship <danw gnome org>
Date:   Tue Mar 3 10:56:20 2015 -0500

    websockets: fix 32-bit build
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745509

 libsoup/soup-websocket-connection.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-websocket-connection.c b/libsoup/soup-websocket-connection.c
index 67b47bc..51f9e5f 100644
--- a/libsoup/soup-websocket-connection.c
+++ b/libsoup/soup-websocket-connection.c
@@ -354,10 +354,14 @@ send_message (SoupWebsocketConnection *self,
                bytes->len = 4;
        } else {
                outer[1] = 127; /* mask | 64-bit-len */
+#if GLIB_SIZEOF_SIZE_T > 4
                outer[2] = (length >> 56) & 0xFF;
                outer[3] = (length >> 48) & 0xFF;
                outer[4] = (length >> 40) & 0xFF;
                outer[5] = (length >> 32) & 0xFF;
+#else
+               outer[2] = outer[3] = outer[4] = outer[5] = 0;
+#endif
                outer[6] = (length >> 24) & 0xFF;
                outer[7] = (length >> 16) & 0xFF;
                outer[8] = (length >> 8) & 0xFF;
@@ -488,7 +492,7 @@ bad_data_error_and_close (SoupWebsocketConnection *self)
 
 static void
 too_big_error_and_close (SoupWebsocketConnection *self,
-                         gsize payload_len)
+                         guint64 payload_len)
 {
        GError *error;
 


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