aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2020-06-13 18:56:37 -0700
committerGitHub <noreply@github.com>2020-06-13 18:56:37 -0700
commit3013a1bb9c9c5c2bb3b4cd085002081a87c2a3ad (patch)
tree7a1da739cbff1b13e9921f53604c25518a39160c
parentMerge pull request #710 from hubvu/suspend-feature (diff)
parentTry to remove brew upgrade python (diff)
downloadredshift-ng-3013a1bb9c9c5c2bb3b4cd085002081a87c2a3ad.tar.gz
redshift-ng-3013a1bb9c9c5c2bb3b4cd085002081a87c2a3ad.tar.bz2
redshift-ng-3013a1bb9c9c5c2bb3b4cd085002081a87c2a3ad.tar.xz
Merge pull request #761 from jonls/jonls/remove-travis-macos-workaround
Fix all CI builds
-rw-r--r--.travis.yml8
-rw-r--r--src/redshift.c5
2 files changed, 5 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index b165a69..cc0d35d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,14 +34,6 @@ before_install: |
brew install gettext
brew link --force gettext
brew install intltool
- brew upgrade python
-
- # distuninstallcheck fails on macOS when automake 1.16 or 1.16.1 is used.
- # http://gnu-automake.7480.n7.nabble.com/bug-31222-automake-1-16-1-am-pep3147-tweak-bug-td22937.html
- # No upstream release yet, use upstream patch.
- pushd /usr/local/Cellar/automake/*/share/automake-*
- curl "https://git.savannah.gnu.org/cgit/automake.git/patch/?id=a348d830659fffd2cfc42994524783b07e69b4b5" | tail -n 14 | sudo patch -p2
- popd
fi
install:
diff --git a/src/redshift.c b/src/redshift.c
index e0221d5..d2ba577 100644
--- a/src/redshift.c
+++ b/src/redshift.c
@@ -28,6 +28,7 @@
#include <math.h>
#include <locale.h>
#include <errno.h>
+#include <time.h>
/* poll.h is not available on Windows but there is no Windows location provider
using polling. On Windows, we just define some stubs to make things compile.
@@ -210,7 +211,11 @@ get_seconds_since_midnight(double timestamp)
{
time_t t = (time_t)timestamp;
struct tm tm;
+#ifdef _WIN32
+ localtime_s(&tm, &t);
+#else
localtime_r(&t, &tm);
+#endif
return tm.tm_sec + tm.tm_min * 60 + tm.tm_hour * 3600;
}