Ticket #4438: 0001-autoconf-Fix-C99-compatibility-issue-in-mc_GET_FS_IN.patch

File 0001-autoconf-Fix-C99-compatibility-issue-in-mc_GET_FS_IN.patch, 1.0 KB (added by fweimer, 22 months ago)
  • m4.include/mc-get-fs-info.m4

    From a2dbad461b8a63630f9ad7cfa36b6613e85a91cb Mon Sep 17 00:00:00 2001
    From: Florian Weimer <fweimer@redhat.com>
    Date: Sun, 5 Feb 2023 18:38:37 +0100
    Subject: [PATCH] autoconf: Fix C99 compatibility issue in mc_GET_FS_INFO check
    Content-type: text/plain
    
    Include <fcntl.h> for the declaration of posix_fallocate.  This
    avoids an implicit function declaration and build issues with future
    compilers.
    
    Signed-off-by: Florian Weimer <fweimer@redhat.com>
    ---
     m4.include/mc-get-fs-info.m4 | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/m4.include/mc-get-fs-info.m4 b/m4.include/mc-get-fs-info.m4
    index 5afc9f1bb..403045aad 100644
    a b AC_DEFUN([gl_POSIX_FALLOCATE], [ 
    88    AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 
    99        #define _XOPEN_SOURCE 600 
    1010        #include <stdlib.h> 
     11        #include <fcntl.h> 
    1112        #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7) 
    1213            possibly broken posix_fallocate 
    1314        #endif