From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> As stat() can overflow if a 32 bit user space reads a file on a file system that has inodes greater than MAX_INT. Compile with _FILE_OFFSET_BITS=64 that mitigates this problem on 32 bit user space. Reported-by: Mike Frysinger <vapier@xxxxxxxxxx> Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 965ff47eae7d..a8a56b6773be 100644 --- a/Makefile +++ b/Makefile @@ -130,6 +130,9 @@ else CFLAGS := -g -Wall endif +# Make sure 32 bit stat() works on large file systems +CFLAGS += -D_FILE_OFFSET_BITS=64 + LIBS ?= -ldl export LIBS -- 2.35.1