diff --git a/src/libguac/guacamole/socket.h b/src/libguac/guacamole/socket.h index 13768595..8cd443b2 100644 --- a/src/libguac/guacamole/socket.h +++ b/src/libguac/guacamole/socket.h @@ -39,7 +39,6 @@ #define _GUAC_SOCKET_H #include -#include #include #include @@ -193,7 +192,7 @@ struct guac_socket { * Whether instructions should be guaranteed atomic across threads using * locks. By default, thread safety is disabled on sockets. */ - bool __threadsafe_instructions; + int __threadsafe_instructions; /** * Lock which is acquired when an instruction is being written, and diff --git a/src/libguac/socket.c b/src/libguac/socket.c index 63193bb2..fc10afe9 100644 --- a/src/libguac/socket.c +++ b/src/libguac/socket.c @@ -157,7 +157,7 @@ guac_socket* guac_socket_alloc() { /* Default to unsafe threading */ - socket->__threadsafe_instructions = false; + socket->__threadsafe_instructions = 0; pthread_mutex_init(&(socket->__instruction_write_lock), NULL); /* No handlers yet */ @@ -171,7 +171,7 @@ guac_socket* guac_socket_alloc() { } void guac_socket_require_threadsafe(guac_socket* socket) { - socket->__threadsafe_instructions = true; + socket->__threadsafe_instructions = 1; } void guac_socket_instruction_begin(guac_socket* socket) {