CMake (Hurd): defines O_PATH=0

This commit is contained in:
Carter Li
2026-01-05 10:45:19 +08:00
parent 32e3ed1fda
commit b21f35e914
2 changed files with 1 additions and 6 deletions
+1 -2
View File
@@ -1410,9 +1410,8 @@ elseif(NetBSD)
elseif(Haiku)
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE)
elseif(GNU)
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE)
# On Hurd PATH_MAX is not defined. Set an arbitrary limit as workaround.
target_compile_definitions(libfastfetch PUBLIC PATH_MAX=4096)
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE PATH_MAX=4096 O_PATH=0)
endif()
if(WIN32)
-4
View File
@@ -14,10 +14,6 @@
#define FF_CPUINFO_PATH "/proc/cpuinfo"
#ifndef O_PATH
#define O_PATH 0
#endif
static double readTempFile(int dfd, const char* filename, FFstrbuf* buffer)
{
if (filename ? !ffReadFileBufferRelative(dfd, filename, buffer) : !ffReadFDBuffer(dfd, buffer))