From c38f29ce561a5c79a82c1c60c34ef88b5ded0660 Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Sat, 23 Aug 2014 14:27:44 +0200 Subject: [PATCH 1/2] system/ByteOrder: is a non-standard header that only Linux provides. --- NEWS | 1 + src/system/ByteOrder.hxx | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/NEWS b/NEWS index ee9240410..d67b38406 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ ver 0.18.13 (not yet released) * decoder - dsdiff, dsf: fix endless loop on malformed file - ffmpeg: support ffmpeg/libav version 11 +* fix build failure on Darwin ver 0.18.12 (2014/07/30) * database diff --git a/src/system/ByteOrder.hxx b/src/system/ByteOrder.hxx index 8beda61c7..42181fe2c 100644 --- a/src/system/ByteOrder.hxx +++ b/src/system/ByteOrder.hxx @@ -40,6 +40,16 @@ /* well-known big-endian */ # define IS_LITTLE_ENDIAN false # define IS_BIG_ENDIAN true +#elif defined(__APPLE__) +/* compile-time check for MacOS */ +# include +# if BYTE_ORDER == LITTLE_ENDIAN +# define IS_LITTLE_ENDIAN true +# define IS_BIG_ENDIAN false +# else +# define IS_LITTLE_ENDIAN false +# define IS_BIG_ENDIAN true +# endif #else /* generic compile-time check */ # include From d16fb797088e32cccecd6373fbe5eaefff423de2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 24 Aug 2014 13:13:12 +0200 Subject: [PATCH 2/2] event/TimeoutMonitor: reset "active" flag before invoking OnTimeout() The IsActive() method returned true even if the timer was not active, after it completed once. This broke the state file timer, and the state file was not saved periodically. --- NEWS | 1 + src/event/TimeoutMonitor.cxx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d67b38406..5d48d9126 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ ver 0.18.13 (not yet released) * decoder - dsdiff, dsf: fix endless loop on malformed file - ffmpeg: support ffmpeg/libav version 11 +* fix state file saver * fix build failure on Darwin ver 0.18.12 (2014/07/30) diff --git a/src/event/TimeoutMonitor.cxx b/src/event/TimeoutMonitor.cxx index cffad6b92..b1e7174eb 100644 --- a/src/event/TimeoutMonitor.cxx +++ b/src/event/TimeoutMonitor.cxx @@ -64,7 +64,9 @@ TimeoutMonitor::ScheduleSeconds(unsigned s) void TimeoutMonitor::Run() { -#ifndef USE_EPOLL +#ifdef USE_EPOLL + active = true; +#else Cancel(); #endif