$ git clone https://libwebsocket.ion.nu/libwebsocket.git
commit dbbaeaab9a07e13c78742320fec80c12b6e82745
Author: Alicia <...>
Date:   Thu Jun 1 05:36:05 2017 +0000

    Made the buffer argument to websock_write() const.

diff --git a/websock.c b/websock.c
index efd36f0..ebb2536 100644
--- a/websock.c
+++ b/websock.c
@@ -260,7 +260,7 @@ char websock_handshake_client(websock_conn* conn, const char* path, const char*
   return 1; // Success
 }
 
-void websock_write(websock_conn* conn, void* buf, unsigned int len, unsigned char opcode)
+void websock_write(websock_conn* conn, const void* buf, unsigned int len, unsigned char opcode)
 {
   unsigned char head[2];
   head[0]=0x80|opcode;
diff --git a/websock.h b/websock.h
index 1d80969..80fb04f 100644
--- a/websock.h
+++ b/websock.h
@@ -38,7 +38,7 @@ extern websock_conn* websock_new(int fd, char tls, const char* cert, const char*
 // NOTE: The callback decides whether or not to accept the request, and if so with which protocol, return 0/NULL to reject, nonsockcb is an option to not treat the session as a websocket session
 extern char websock_handshake_server(websock_conn* conn, const char*(*cb)(const char* path, const char* host, char* protocol, const char* origin), char(*nonsockcb)(const char* path, const char* host));
 extern char websock_handshake_client(websock_conn* conn, const char* path, const char* host, char* protocol, const char* origin, const char* cookie);
-extern void websock_write(websock_conn* conn, void* buf, unsigned int len, unsigned char opcode);
+extern void websock_write(websock_conn* conn, const void* buf, unsigned int len, unsigned char opcode);
 extern char websock_readhead(websock_conn* conn, struct websock_head* head_info);
 extern char websock_readcontent(websock_conn* conn, void* buf_, struct websock_head* head);
 #endif