Fix: fix warning: type struct CFile violates the C++ one definition rule

Set _FILE_OFFSET_BITS=64 in Makefiles for consistent 64-bit off_t definition

This removes -Wodr warnings when compiling CFile and several other classes,
ensuring off_t is consistently defined as a 64-bit type across all
translation units.

Observed while compiling with GCC 13.

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
GetAway
2024-11-07 21:20:52 +01:00
committed by Thilo Graf
parent 4153ea976a
commit 08c50dd4eb
2 changed files with 3 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
AM_CXXFLAGS = -fno-rtti -fno-exceptions -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64
SUBDIRS = pictureviewer audiodec
@@ -6,7 +7,7 @@ if ENABLE_GRAPHLCD
SUBDIRS += glcd
endif
AM_CPPFLAGS = \
AM_CPPFLAGS += \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_srcdir)/src \

View File

@@ -1,4 +1,4 @@
AM_CPPFLAGS = -fno-rtti -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
AM_CPPFLAGS = -fno-rtti -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_FILE_OFFSET_BITS=64
BUILT_SOURCES = version.h
version.h:
@rm -f $@; \