aboutsummaryrefslogtreecommitdiffstats
path: root/src/rds_mod.c
diff options
context:
space:
mode:
authorMartin Hauke <mardnh@gmx.de>2018-04-24 20:47:38 +0200
committerSteve Markgraf <steve@steve-m.de>2018-04-24 21:40:14 +0200
commit0325fa9496e622200506ead78db8df2209fb39d2 (patch)
tree42158327d3031ca0b923922619ffde315e62f5f1 /src/rds_mod.c
parent0d520ba1132eb9ba90904625e4bf7c3002180ef6 (diff)
downloadosmo-fl2k-0325fa9496e622200506ead78db8df2209fb39d2.tar.gz
osmo-fl2k-0325fa9496e622200506ead78db8df2209fb39d2.tar.bz2
osmo-fl2k-0325fa9496e622200506ead78db8df2209fb39d2.zip
Fix build with MinGW
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'src/rds_mod.c')
-rw-r--r--src/rds_mod.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rds_mod.c b/src/rds_mod.c
index 865ca11..8e31b0d 100644
--- a/src/rds_mod.c
+++ b/src/rds_mod.c
@@ -109,7 +109,13 @@ int get_rds_ct_group(uint16_t *blocks)
utc = localtime(&now);
+ //'struct tm' has no member named 'tm_gmtoff' on Windows+MinGW
+ #if defined(__APPLE__) || defined(__FreeBSD__)
offset = utc->tm_gmtoff / (30 * 60);
+ #else
+ offset = time(NULL) / (30 * 60);
+ #endif
+
blocks[3] |= abs(offset);
if (offset < 0)
blocks[3] |= 0x20;