Files
ports/audio/rezound/files/patch-src_misc_clocks.cpp
T
Alexey Dokuchaev 44a8d7d300 audio/rezound: improve (and shorten!) one of the patch files
Provide get_timezone_offset() implementation for FreeBSD next
to the glibc-specific code rather than deleting and replacing
the latter.
2023-08-16 05:10:44 +00:00

13 lines
318 B
C++

--- src/misc/clocks.cpp.orig 2013-02-10 06:35:02 UTC
+++ src/misc/clocks.cpp
@@ -303,6 +303,9 @@ int get_timezone_offset()
{
#ifdef __APPLE__
int ret = [[NSTimeZone localTimeZone] secondsFromGMT];
+#elif defined(__FreeBSD__)
+ time_t date = time(NULL);
+ int ret = localtime(&date)->tm_gmtoff;
#else
tzset();