1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
Description: Fix 32 bit builld failures due to glong not being "long" to cope with 64 bit time_t
Author: Gianfranco Costamagna <locutusofborg@debian.org>
Last-Update: 2025-03-24
--- liboobs-3.0.0.orig/oobs/oobs-timeconfig.c
+++ liboobs-3.0.0/oobs/oobs-timeconfig.c
@@ -328,10 +328,10 @@ date_is_sane (gint year,
*
* Return Value: The unix time of the system.
**/
-glong
+time_t
oobs_time_config_get_unix_time (OobsTimeConfig *config)
{
- glong unix_time;
+ time_t unix_time;
g_return_val_if_fail (OOBS_IS_TIME_CONFIG (config), 0);
@@ -349,7 +349,7 @@ oobs_time_config_get_unix_time (OobsTime
* is measured in seconds, since the "epoch" (1970-01-01T00:00:00Z).
**/
void
-oobs_time_config_set_unix_time (OobsTimeConfig *config, glong unix_time)
+oobs_time_config_set_unix_time (OobsTimeConfig *config, time_t unix_time)
{
g_return_if_fail (OOBS_IS_TIME_CONFIG (config));
@@ -366,7 +366,7 @@ real_get_time (OobsTimeConfig *config,
gint *minute,
gint *second)
{
- glong unix_time;
+ time_t unix_time;
struct tm *tm;
g_return_if_fail (OOBS_IS_TIME_CONFIG (config));
@@ -450,11 +450,11 @@ oobs_time_config_get_utc_time (OobsTimeC
hour, minute, second);
}
-static glong
+static time_t
get_utc_unix_time (struct tm *tm)
{
gchar *tz;
- glong unix_time;
+ time_t unix_time;
tz = getenv ("TZ");
setenv ("TZ", "", 1);
@@ -483,7 +483,7 @@ real_set_time (OobsTimeConfig *config,
gint second)
{
struct tm tm = { 0, };
- glong unix_time;
+ time_t unix_time;
g_return_if_fail (OOBS_IS_TIME_CONFIG (config));
g_return_if_fail (date_is_sane (year, month, day, hour, minute, second));
--- liboobs-3.0.0.orig/oobs/oobs-timeconfig.h
+++ liboobs-3.0.0/oobs/oobs-timeconfig.h
@@ -59,8 +59,8 @@ GType oobs_time_config_get_type
OobsObject* oobs_time_config_get (void);
-glong oobs_time_config_get_unix_time (OobsTimeConfig *config);
-void oobs_time_config_set_unix_time (OobsTimeConfig *config, glong unix_time);
+time_t oobs_time_config_get_unix_time (OobsTimeConfig *config);
+void oobs_time_config_set_unix_time (OobsTimeConfig *config, time_t unix_time);
void oobs_time_config_get_time (OobsTimeConfig *config, gint *year, gint *month, gint *day, gint *hour, gint *minute, gint *second);
void oobs_time_config_set_time (OobsTimeConfig *config, gint year, gint month, gint day, gint hour, gint minute, gint second);
|