[packages/ConsoleKit] - fix for time_t != glong; release 5
qboosh
qboosh at pld-linux.org
Fri May 30 22:16:22 CEST 2025
commit 35551dc0929361b65fbbfb7d82d7e3859f1ff443
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri May 30 22:13:51 2025 +0200
- fix for time_t != glong; release 5
ConsoleKit-types.patch | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
ConsoleKit.spec | 4 +++-
2 files changed, 53 insertions(+), 1 deletion(-)
---
diff --git a/ConsoleKit.spec b/ConsoleKit.spec
index 8dd2143..f99bfc8 100644
--- a/ConsoleKit.spec
+++ b/ConsoleKit.spec
@@ -2,13 +2,14 @@ Summary: ConsoleKit for PolicyKit
Summary(pl.UTF-8): ConsoleKit dla PolicyKit
Name: ConsoleKit
Version: 0.4.6
-Release: 4
+Release: 5
License: GPL v2+
Group: Libraries
Source0: http://www.freedesktop.org/software/ConsoleKit/dist/%{name}-%{version}.tar.xz
# Source0-md5: 611792b4d616253a5bdec9175f8b7678
Source1: %{name}.tmpfiles
Patch0: %{name}-gzip.patch
+Patch1: %{name}-types.patch
URL: http://www.freedesktop.org/wiki/Software/ConsoleKit
BuildRequires: dbus-glib-devel >= 0.82
BuildRequires: docbook-dtd412-xml
@@ -119,6 +120,7 @@ Narzędzia obsługujące sesje X11 dla pakietu ConsoleKit.
%prep
%setup -q
%patch -P0 -p1
+%patch -P1 -p1
%build
%{__libtoolize}
diff --git a/ConsoleKit-types.patch b/ConsoleKit-types.patch
new file mode 100644
index 0000000..94ded70
--- /dev/null
+++ b/ConsoleKit-types.patch
@@ -0,0 +1,50 @@
+--- ConsoleKit-0.4.6/tools/ck-history.c.orig 2025-05-30 22:03:52.347600893 +0200
++++ ConsoleKit-0.4.6/tools/ck-history.c 2025-05-30 22:11:16.143499314 +0200
+@@ -514,6 +514,7 @@ print_last_report_record (GList *li
+ CkLogSeatSessionAddedEvent *e;
+ CkLogEvent *remove_event;
+ RecordStatus status;
++ time_t ts;
+
+ if (event->type != CK_LOG_EVENT_SEAT_SESSION_ADDED
+ && event->type != CK_LOG_EVENT_SYSTEM_START) {
+@@ -546,7 +547,8 @@ print_last_report_record (GList *li
+ utline = get_utline_for_event (event);
+ host = get_host_for_event (event);
+
+- addedtime = g_strndup (ctime (&event->timestamp.tv_sec), 16);
++ ts = event->timestamp.tv_sec;
++ addedtime = g_strndup (ctime (&ts), 16);
+
+ if (legacy_compat) {
+ g_string_printf (str,
+@@ -602,7 +604,8 @@ print_last_report_record (GList *li
+ break;
+ case RECORD_STATUS_NORMAL:
+ duration = get_duration (event, remove_event);
+- removedtime = g_strdup_printf ("- %s", ctime (&remove_event->timestamp.tv_sec) + 11);
++ ts = remove_event->timestamp.tv_sec;
++ removedtime = g_strdup_printf ("- %s", ctime (&ts) + 11);
+ removedtime[7] = 0;
+ break;
+ default:
+@@ -660,7 +663,8 @@ generate_report_last (int uid,
+ oldest = g_list_first (all_events);
+ if (oldest != NULL) {
+ oldest_event = oldest->data;
+- g_print ("\nLog begins %s", ctime (&oldest_event->timestamp.tv_sec));
++ time_t ts = oldest_event->timestamp.tv_sec;
++ g_print ("\nLog begins %s", ctime (&ts));
+ }
+ }
+
+@@ -703,7 +707,8 @@ generate_report_last_compat (int
+ oldest = g_list_first (all_events);
+ if (oldest != NULL) {
+ oldest_event = oldest->data;
+- g_print ("\nLog begins %s", ctime (&oldest_event->timestamp.tv_sec));
++ time_t ts = oldest_event->timestamp.tv_sec;
++ g_print ("\nLog begins %s", ctime (&ts));
+ }
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ConsoleKit.git/commitdiff/35551dc0929361b65fbbfb7d82d7e3859f1ff443
More information about the pld-cvs-commit
mailing list