From 6a2c2c82a1502e10cc3030c8e1980a1f0e76d610 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Mon, 1 Jul 2024 14:35:17 +0300 Subject: [PATCH] 32-bit changes for rpi, from lgultgithub --- builder/build.sh | 2 ++ common/network/websocket.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/builder/build.sh b/builder/build.sh index 9cee060..e2842eb 100755 --- a/builder/build.sh +++ b/builder/build.sh @@ -139,6 +139,8 @@ if [ -d /usr/lib/x86_64-linux-gnu/dri ]; then ln -s /usr/lib/x86_64-linux-gnu/dri dri elif [ -d /usr/lib/aarch64-linux-gnu/dri ]; then ln -s /usr/lib/aarch64-linux-gnu/dri dri +elif [ -d /usr/lib/arm-linux-gnueabihf/dri ]; then + ln -s /usr/lib/arm-linux-gnueabihf/dri dri elif [ -d /usr/lib/xorg/modules/dri ]; then ln -s /usr/lib/xorg/modules/dri dri else diff --git a/common/network/websocket.c b/common/network/websocket.c index d4bc772..cdedda4 100644 --- a/common/network/websocket.c +++ b/common/network/websocket.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -939,15 +940,15 @@ static void servefile(ws_ctx_t *ws_ctx, const char *in, const char * const user, goto nope; } - fseek(f, 0, SEEK_END); - const uint64_t filesize = ftell(f); + fseeko(f, 0, SEEK_END); + const uint64_t filesize = ftello(f); rewind(f); sprintf(buf, "HTTP/1.1 200 OK\r\n" "Server: KasmVNC/4.0\r\n" "Connection: close\r\n" "Content-type: %s\r\n" - "Content-length: %lu\r\n" + "Content-length: %" PRIu64 "\r\n" "%s" "\r\n", name2mime(path), filesize, extra_headers ? extra_headers : "");