File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -304,12 +304,21 @@ check_symbol_exists(setenv "stdlib.h" HAVE_SETENV)
304
304
check_symbol_exists (shutdown "sys/socket.h" HAVE_SHUTDOWN )
305
305
check_symbol_exists (sigprocmask "signal.h" HAVE_SIGPROCMASK )
306
306
307
- # BSD-based systems have statfs in sys/mount.h.
308
- if (HAVE_SYS_MOUNT_H )
309
- check_symbol_exists (statfs "sys/mount.h" HAVE_STATFS )
310
- else ()
311
- check_symbol_exists (statfs "sys/statfs.h" HAVE_STATFS )
312
- endif ()
307
+ # Check for statfs().
308
+ block ()
309
+ set (headers "" )
310
+
311
+ # BSD-based systems have statfs in sys/mount.h.
312
+ if (HAVE_SYS_MOUNT_H )
313
+ list (APPEND headers "sys/mount.h" )
314
+ endif ()
315
+
316
+ if (HAVE_SYS_STATFS_H )
317
+ list (APPEND headers "sys/statfs.h" )
318
+ endif ()
319
+
320
+ check_symbol_exists (statfs "${headers} " HAVE_STATFS )
321
+ endblock ()
313
322
314
323
check_symbol_exists (statvfs "sys/statvfs.h" HAVE_STATVFS )
315
324
check_symbol_exists (std_syslog "sys/syslog.h" HAVE_STD_SYSLOG )
You can’t perform that action at this time.
0 commit comments