mc/mc-configure-c99.patch

19 lines
718 B
Diff

Include <fcntl.h> for the declaration of posix_fallocate. This
avoids an implicit function declaration and build issues with future
compilers.
Submitted upstream: <https://midnight-commander.org/ticket/4438>
diff --git a/m4.include/mc-get-fs-info.m4 b/m4.include/mc-get-fs-info.m4
index 5afc9f1bb938bfcd..403045aadc810ba7 100644
--- a/m4.include/mc-get-fs-info.m4
+++ b/m4.include/mc-get-fs-info.m4
@@ -8,6 +8,7 @@ AC_DEFUN([gl_POSIX_FALLOCATE], [
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _XOPEN_SOURCE 600
#include <stdlib.h>
+ #include <fcntl.h>
#if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
possibly broken posix_fallocate
#endif