github.com/opencontainers/runc@v1.2.0-rc.1.0.20240520010911-492dc558cdd6/libcontainer/dmz/xstat.h (about)

     1  #ifndef XSTAT_H
     2  #define XSTAT_H
     3  
     4  // Some old-kernels (like centos-7) don't have statx() defined in linux/stat.h. We can't include
     5  // sys/stat.h because it creates conflicts, so let's just define what we need here and be done with
     6  // this.
     7  // TODO (rata): I'll probably submit a patch to nolibc upstream so we can remove this hack in the
     8  // future.
     9  #include <linux/stat.h>  /* for statx() */
    10  
    11  #ifndef STATX_BASIC_STATS
    12  #include "linux/stat.h"
    13  #endif // STATX_BASIC_STATS
    14  
    15  #endif // XSTAT_H