diff options
-rw-r--r-- | mtab.c | 6 | ||||
-rw-r--r-- | util.c | 2 | ||||
-rw-r--r-- | util.h | 6 |
3 files changed, 8 insertions, 6 deletions
@@ -24,11 +24,7 @@ #include <sys/stat.h> #include <sys/types.h> -#ifndef __has_include -# define __has_include(header) 0 -#endif - -#if __GLIBC__ || __has_include(<mntent.h>) +#if __GLIBC__ || BFS_HAS_INCLUDE(<mntent.h>) # define BFS_MNTENT 1 #elif BSD # define BFS_MNTINFO 1 @@ -30,7 +30,7 @@ #include <sys/types.h> #include <unistd.h> -#if __GLIBC__ || __has_include(<sys/sysmacros.h>) +#if __GLIBC__ || BFS_HAS_INCLUDE(<sys/sysmacros.h>) # include <sys/sysmacros.h> #endif @@ -28,6 +28,12 @@ // Some portability concerns +#ifdef __has_include +# define BFS_HAS_INCLUDE(header) __has_include(header) +#else +# define BFS_HAS_INCLUDE(header) false +#endif + #if !defined(FNM_CASEFOLD) && defined(FNM_IGNORECASE) # define FNM_CASEFOLD FNM_IGNORECASE #endif |