git: 44a8d7d3005f - main - audio/rezound: improve (and shorten!) one of the patch files
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Aug 2023 05:11:47 UTC
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=44a8d7d3005f3b3ede09de481d76698bdce5403e commit 44a8d7d3005f3b3ede09de481d76698bdce5403e Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2023-08-16 05:10:44 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2023-08-16 05:10:44 +0000 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. --- audio/rezound/files/patch-src_misc_clocks.cpp | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/audio/rezound/files/patch-src_misc_clocks.cpp b/audio/rezound/files/patch-src_misc_clocks.cpp index df1c2e5e29bd..974d872d776e 100644 --- a/audio/rezound/files/patch-src_misc_clocks.cpp +++ b/audio/rezound/files/patch-src_misc_clocks.cpp @@ -1,23 +1,12 @@ --- src/misc/clocks.cpp.orig 2013-02-10 06:35:02 UTC +++ src/misc/clocks.cpp -@@ -304,18 +304,8 @@ int get_timezone_offset() +@@ -303,6 +303,9 @@ int get_timezone_offset() + { #ifdef __APPLE__ int ret = [[NSTimeZone localTimeZone] secondsFromGMT]; - #else -- tzset(); -- -- // ::timezone's manpage says "Seconds West of GMT", but I found this not to be the case -- // ::timezone is in the range [-12*3600, 12*3600], but it's sign is opposite what we expect: -- // Central Time is +6 hours -- // We want to return -6 hours for Central, so we translate the range and ensure it's min and max value -- -- -- int ret = ::timezone; -- -- // invert sign for our purposes -- ret = -ret; ++#elif defined(__FreeBSD__) + time_t date = time(NULL); + int ret = localtime(&date)->tm_gmtoff; - #endif - - // "clamp-and-shift" to convert values outside the appropriate + #else + tzset(); +