• Dridi Boukelmoune's avatar
    Revert "On linux, use close_range() if available and prefer it over closefrom()" · 31baed29
    Dridi Boukelmoune authored
    This reverts commit 0c1aef58.
    
    The close_range(2) system call is too recent and not recognized by the
    host system on CircleCI, so the fedora-latest container detects it but
    is denied execution (EPERM) from the host's libseccomp.
    
    Also, on platforms with neither close_range(2) nor closefrom(2) we ended
    up not including <dirent.h> and failing virtually everywhere in our CI.
    
    The ifdef dance could have looked like this:
    
        #ifdef HAVE_LINUX_CLOSE_RANGE_H
        #  include <linux/close_range.h>
        #elif HAVE_CLOSEFROM
        #else
        #  include <dirent.h>
        #endif
    
    Note the extra #else missing from the original patch.
    
    This is reverted for now because we need to check that close_range(2)
    works at configure time to circumvent the host mismatch problem.
    31baed29
vsub.c 4.56 KB