Skip to content

Commit

Permalink
Only check for presence of statfs() function
Browse files Browse the repository at this point in the history
  • Loading branch information
lpereira committed Dec 22, 2020
1 parent b69d94e commit b99fd3a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,7 @@ check_function_exists(getentropy HAVE_GETENTROPY)
check_function_exists(fwrite_unlocked HAVE_FWRITE_UNLOCKED)
check_function_exists(gettid HAVE_GETTID)
check_function_exists(secure_getenv HAVE_SECURE_GETENV)

check_include_files("sys/vfs.h" HAVE_SYS_VFS_H)
if (HAVE_SYS_VFS_H)
check_symbol_exists(statfs sys/vfs.h HAVE_STATFS)
endif ()
if (NOT HAVE_STATFS)
check_include_files("sys/mount.h" HAVE_SYS_MOUNT_H)
if (HAVE_SYS_MOUNT_H)
check_symbol_exists(statfs "sys/mount.h" HAVE_STATFS)
endif ()
endif()
check_function_exists(statfs HAVE_STATFS)

# This is available on -ldl in glibc, but some systems (such as OpenBSD)
# will bundle these in the C library. This isn't required for glibc anyway,
Expand Down

0 comments on commit b99fd3a

Please sign in to comment.