From 65d25446fef88dd52cf1733db9b45bf67f56d29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Mon, 14 Aug 2023 10:05:43 +0800 Subject: [PATCH] Users: use `__has_include` --- CMakeLists.txt | 5 ----- src/detection/users/users_linux.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d461a209e..71f580cd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -630,11 +630,6 @@ if(WIN32) target_compile_definitions(libfastfetch PUBLIC WIN32_LEAN_AND_MEAN=1) endif() -CHECK_INCLUDE_FILE("utmpx.h" HAVE_UTMPX_H) -if(HAVE_UTMPX_H) - target_compile_definitions(libfastfetch PRIVATE FF_HAVE_UTMPX_H) -endif() - if(HAVE_WCWIDTH) target_compile_definitions(libfastfetch PRIVATE FF_HAVE_WCWIDTH) endif() diff --git a/src/detection/users/users_linux.c b/src/detection/users/users_linux.c index 3b4963a14..c17bf139c 100644 --- a/src/detection/users/users_linux.c +++ b/src/detection/users/users_linux.c @@ -1,7 +1,7 @@ #include "fastfetch.h" #include "users.h" -#if FF_HAVE_UTMPX_H +#if __has_include() #include #else //for Android compatibility