mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-12 09:46:25 +08:00
90f5da651a
Linux repo has under `tools/include/nolibc` very simple include files that we can use to generate very small binaries that don't depend on libc. To make things even better, since Linux 6.6 it supports all the architectures we support in runc, which is just beautiful. The runc-dmz binary on x86_64 before this patch (on my debian host) was taking 636K, with this patch it takes only 8K. Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
16 lines
489 B
C
16 lines
489 B
C
#ifndef XSTAT_H
|
|
#define XSTAT_H
|
|
|
|
// Some old-kernels (like centos-7) don't have statx() defined in linux/stat.h. We can't include
|
|
// sys/stat.h because it creates conflicts, so let's just define what we need here and be done with
|
|
// this.
|
|
// TODO (rata): I'll probably submit a patch to nolibc upstream so we can remove this hack in the
|
|
// future.
|
|
#include <linux/stat.h> /* for statx() */
|
|
|
|
#ifndef STATX_BASIC_STATS
|
|
#include "linux/stat.h"
|
|
#endif // STATX_BASIC_STATS
|
|
|
|
#endif // XSTAT_H
|