From 7e2a9f66f42df36af8a32902f1bf0a6324df8ffe Mon Sep 17 00:00:00 2001 From: GetAway Date: Sun, 10 Nov 2024 20:03:08 +0100 Subject: [PATCH] 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 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/decda9db11cbf4ad690b3032da535c4383fa5735 Author: GetAway Date: 2024-11-10 (Sun, 10 Nov 2024) ------------------ This commit was generated by Migit --- src/driver/Makefile.am | 3 ++- src/gui/Makefile.am | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am index 72a1c19bf..9675eb14a 100644 --- a/src/driver/Makefile.am +++ b/src/driver/Makefile.am @@ -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 \ diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 4f2071964..c1590b7e5 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -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 VERSION_H = version.h $(VERSION_H):