Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] domoticz: fix build with gcc <= 4.7
@ 2018-09-17 16:55 Fabrice Fontaine
  2018-09-20 21:50 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Fontaine @ 2018-09-17 16:55 UTC (permalink / raw)
  To: buildroot

sleep_for is not always defined with gcc <= 4.7, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680

To fix this issue, add -D_GLIBCXX_USE_NANOSLEEP if gcc version is lower
than 4.8

Fixes:
 - http://autobuild.buildroot.net/results/0dada8dd727f32a4500670f6620adb05943ed0b7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/domoticz/domoticz.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/domoticz/domoticz.mk b/package/domoticz/domoticz.mk
index 7f094d0976..832774a147 100644
--- a/package/domoticz/domoticz.mk
+++ b/package/domoticz/domoticz.mk
@@ -18,6 +18,12 @@ DOMOTICZ_DEPENDENCIES = \
 	sqlite \
 	zlib
 
+# sleep_for, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680
+ifneq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8),y)
+DOMOTICZ_CONF_OPTS += \
+	-DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -D_GLIBCXX_USE_NANOSLEEP"
+endif
+
 # Due to the dependency on mosquitto, domoticz depends on
 # !BR2_STATIC_LIBS so set USE_STATIC_BOOST and USE_OPENSSL_STATIC to OFF
 DOMOTICZ_CONF_OPTS += \
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-20 21:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-17 16:55 [Buildroot] [PATCH 1/1] domoticz: fix build with gcc <= 4.7 Fabrice Fontaine
2018-09-20 21:50 ` Thomas Petazzoni
2018-09-20 21:52   ` Fabrice Fontaine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox