Fix build with musl

This commit is contained in:
dec05eba
2026-03-22 20:08:14 +01:00
parent c3e9aa0f81
commit 5ef06a2466
5 changed files with 8 additions and 5 deletions

View File

@@ -300,8 +300,8 @@ namespace gsr {
return;
}
struct stat64 stat;
if(fstat64(file_fd, &stat) == -1) {
struct stat stat;
if(fstat(file_fd, &stat) == -1) {
fprintf(stderr, "gsr ui: error: ClipboardFile::set_current_file: failed to get file size for file %s, error: %s\n", filepath.c_str(), strerror(errno));
close(file_fd);
file_fd = -1;

View File

@@ -3,7 +3,7 @@
#include <fcntl.h>
#include <limits.h>
#include <string.h>
#include <unistd.h>
extern "C" {
#include <mgl/mgl.h>
}

View File

@@ -32,6 +32,7 @@
#include <algorithm>
#include <inttypes.h>
#include <math.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>

View File

@@ -9,6 +9,7 @@
#include <mglpp/window/Event.hpp>
#include <mglpp/system/FloatRect.hpp>
#include <limits.h>
#include <dirent.h>
#include <sys/stat.h>
#include <errno.h>

View File

@@ -10,6 +10,7 @@
#include <string.h>
#include <limits.h>
#include <malloc.h>
#include <unistd.h>
#include <mglpp/mglpp.hpp>
#include <mglpp/system/Clock.hpp>