Skip to contentSkip to conversation

libtraceevent: Make sure 32 bit works on 64 bit file systems

PATCH Superseded Steven Rostedt 2 participants 2 messages Dec 21, 2022 – Dec 22, 2022 Kbuild

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 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.

---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)
Makefile +3 -0
index 965ff47eae7d..a8a56b6773be 100644
@@ -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
 
Signature · 1 line
2.35.1