Skip to contentSkip to conversation

master - build: add -D_FILE_OFFSET_BITS=64

PATCH Joe Thornber 1 participant 1 message May 2, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=972b535220d2d9f4df583bcc5e67e8cc14ca6294
Commit:        972b535220d2d9f4df583bcc5e67e8cc14ca6294
Parent:        9fe0be871c916c1105212f916d8c6904d12ea5b4
Author:        Joe Thornber <[email protected]>
AuthorDate:    Wed May 2 18:40:38 2018 +0100
Committer:     Joe Thornber <[email protected]>
CommitterDate: Wed May 2 18:40:38 2018 +0100

build: add -D_FILE_OFFSET_BITS=64

I don't like having this in a common header because it means you end up including too much and causing unneccessary dependencies. eg, lib/misc/lib.h includes libdevmapper.h, internationalisation, and logging stuff.

---
 daemons/cmirrord/logging.h |    1 -
 lib/misc/lib.h             |    1 -
 make.tmpl.in               |    3 +++
 tools/tool.h               |    1 -
 4 files changed, 3 insertions(+), 3 deletions(-)
daemons/cmirrord/logging.h +0 -1
index 3ede0c7..13e6b39 100644
@@ -14,7 +14,6 @@
 #define _LVM_CLOG_LOGGING_H
 
 #define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
 
 #include "configure.h"
 #include <stdio.h>
lib/misc/lib.h +0 -1
index 8ed06f8..d7fa5c7 100644
@@ -23,7 +23,6 @@
 
 #define _REENTRANT
 #define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
 
 /*
  * Symbol export control macros
make.tmpl.in +3 -0
index 3a9f450..d3a80ef 100644
@@ -444,6 +444,9 @@ endif
 
 DEPFLAGS=-MT $@ -MMD -MP -MF $*.d
 
+# still needed in 2018 for 32bit builds
+DEFS+=-D_FILE_OFFSET_BITS=64
+
 %.o: %.c
 	@echo "    [CC] $<"
 	$(Q) $(CC) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
tools/tool.h +0 -1
index 79b30bc..a2c8572 100644
@@ -19,7 +19,6 @@
 #define _LVM_TOOL_H
 
 #define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
 
 #include "configure.h"