libtraceevent: Make sure 32 bit works on 64 bit file systems
PATCH v3 1/1 libtraceevent: Make sure 32 bit works on 64 bit file systems
From: "Steven Rostedt (Google)" <[email protected]>
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 <[email protected]>
Signed-off-by Steven Rostedt (Google) <[email protected]>
---
Changes since v2: https://lore.kernel.org/linux-trace-devel/[email protected]/
- Add "override" otherwise it can get lost if CFLAGS is defined externally
Makefile | 3 +++ 1 file changed, 3 insertions(+)
Makefile +3 -0
@@ -164,6 +164,9 @@ override CFLAGS += -fPIC override CFLAGS += $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ) override CFLAGS += $(udis86-flags) -D_GNU_SOURCE +# Make sure 32 bit stat() works on large file systems +override CFLAGS += -D_FILE_OFFSET_BITS=64 + ifeq ($(VERBOSE),1) Q = else
Signature · 1 line
2.35.1