diff --git a/CMakeLists.txt b/CMakeLists.txt index 860cdd387..18ae01633 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/detection/cpu/cpu_linux.c b/src/detection/cpu/cpu_linux.c index db9e4ce7e..9edcac48f 100644 --- a/src/detection/cpu/cpu_linux.c +++ b/src/detection/cpu/cpu_linux.c @@ -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))