Skip to content

Commit 65d2544

Browse files
committed
Users: use __has_include
1 parent b39c84f commit 65d2544

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -630,11 +630,6 @@ if(WIN32)
630630
target_compile_definitions(libfastfetch PUBLIC WIN32_LEAN_AND_MEAN=1)
631631
endif()
632632

633-
CHECK_INCLUDE_FILE("utmpx.h" HAVE_UTMPX_H)
634-
if(HAVE_UTMPX_H)
635-
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_UTMPX_H)
636-
endif()
637-
638633
if(HAVE_WCWIDTH)
639634
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_WCWIDTH)
640635
endif()

src/detection/users/users_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "fastfetch.h"
22
#include "users.h"
33

4-
#if FF_HAVE_UTMPX_H
4+
#if __has_include(<utmpx.h>)
55
#include <utmpx.h>
66
#else
77
//for Android compatibility

0 commit comments

Comments
 (0)