]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
wdc-nvme: fix uclibc compilation.
authorSushrut Shirole <sushrutshirole@gmail.com>
Fri, 9 Jul 2021 21:22:20 +0000 (14:22 -0700)
committerDaniel Wagner <dwagner@suse.de>
Mon, 15 Nov 2021 11:06:28 +0000 (12:06 +0100)
plugins/wdc/wdc-utils.c

index 2740181746b784156d40e14a4e948d259b75508b..52c427bb56eaed2db55e39dbbc56f6cdc165b12e 100644 (file)
@@ -77,7 +77,11 @@ int wdc_UtilsGetTime(PUtilsTimeInfo timeInfo)
        timeInfo->second                =  currTimeInfo.tm_sec;
        timeInfo->msecs                 =  0;
        timeInfo->isDST                 =  currTimeInfo.tm_isdst;
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__MUSL__)
        timeInfo->zone                  = -currTimeInfo.tm_gmtoff / 60;
+#else
+       timeInfo->zone                  = -1 * (timezone / SECONDS_IN_MIN);
+#endif
 
        return WDC_STATUS_SUCCESS;
 }