diff --git a/libgphoto2_port/configure.ac b/libgphoto2_port/configure.ac index 686adf7d8..0187d63f2 100644 --- a/libgphoto2_port/configure.ac +++ b/libgphoto2_port/configure.ac @@ -223,7 +223,7 @@ AC_MSG_RESULT(no) dnl Checks for library functions. -AC_CHECK_FUNCS(strerror snprintf vsnprintf) +AC_CHECK_FUNCS(setmntent endmntent strerror snprintf vsnprintf) dnl Check if TIOCM_RTS is included in one of several possible files AC_TRY_COMPILE([#include ], [int foo = TIOCM_RTS;], diff --git a/libgphoto2_port/disk/disk.c b/libgphoto2_port/disk/disk.c index f49f3a63a..e44c60e99 100644 --- a/libgphoto2_port/disk/disk.c +++ b/libgphoto2_port/disk/disk.c @@ -48,7 +48,7 @@ #define setmntent(f,m) fopen(f,m) #endif #ifndef HAVE_ENDMNTENT -#define endmntent(f) close(f) +#define endmntent(f) fclose(f) #endif #ifdef HAVE_HAL