diff --git a/configure.ac b/configure.ac index 67c1f18..603e4cc 100644 --- a/configure.ac +++ b/configure.ac @@ -48,7 +48,7 @@ dnl Libraries that may contain key functions. AC_SEARCH_LIBS([clock_gettime],[rt]) dnl Items we can't do without. -AC_CHECK_FUNCS([alarm basename clock_gettime dup2 getcwd memcpy memmove memset select setlocale strchr strerror strrchr strstr], [], [AC_MSG_ERROR([required function is missing])]) +AC_CHECK_FUNCS([alarm basename clock_gettime dup2 getcwd memcpy memmove memset mkdir select setlocale strchr strerror strrchr strstr], [], [AC_MSG_ERROR([required function is missing])]) AC_CHECK_HEADERS([fcntl.h sys/file.h sys/time.h unistd.h], [], [AC_MSG_ERROR([required header file is missing])]) dnl Make sure all the types we use are defined. @@ -60,7 +60,9 @@ AC_TYPE_SIZE_T AC_TYPE_SSIZE_T AC_TYPE_UID_T -dnl Check that a signal handler can't see the PID of the sender. +AC_CHECK_MEMBERS([struct stat.st_rdev]) + +dnl Check whether a signal handler can see the PID of the sender. AC_MSG_CHECKING([siginfo_t provides a signal sender's PID]) AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ diff --git a/src/include/config.h.in b/src/include/config.h.in index 99b33cc..fcfb410 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -91,6 +91,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MINIX_CONFIG_H +/* Define to 1 if you have the `mkdir' function. */ +#undef HAVE_MKDIR + /* Define to 1 if you have the `nanosleep' function. */ #undef HAVE_NANOSLEEP @@ -157,6 +160,9 @@ /* Define to 1 if `st_blksize' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE +/* Define to 1 if `st_rdev' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_RDEV + /* Define to 1 if you have the `sysconf' function. */ #undef HAVE_SYSCONF diff --git a/src/main/options.c b/src/main/options.c index f374afa..53f7c63 100644 --- a/src/main/options.c +++ b/src/main/options.c @@ -19,10 +19,12 @@ #include #ifdef major #ifdef minor +#ifdef HAVE_STRUCT_STAT_ST_RDEV #define CAN_BUILD_SYSFS_FILENAME 1 #endif #endif #endif +#endif #include #include #ifdef HAVE_GETOPT_H