mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-21 23:53:24 +01:00
Merge branch 'bugfix/rpi32bit' into 'master'
32-bit changes for rpi, from lgultgithub See merge request kasm-technologies/internal/KasmVNC!139
This commit is contained in:
commit
e535430a2c
@ -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
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <dirent.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
@ -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 : "");
|
||||
|
Loading…
Reference in New Issue
Block a user