Package: src:packagekit
Version: 1.0.1-2
Severity: normal
Tags: patch
User: [email protected]
Usertags: port-x32 ftbfs-x32

Hi!
I'm afraid packagekit fails to build on x32 because of an assumption that
time_t is same as long.  A patch attached.


-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (600, 'unstable'), (500, 'unreleased'), (50, 'experimental')
Architecture: x32 (x86_64)

Kernel: Linux 3.18.5-x32 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Description: Don't assume time_t is same as long.
 Per Linus' decree, any new architecture is to be safe from the Y2K38 bug.
 This means, time_t will be at least 64 bit, while long might be 32.
 An example of such an architecture is x32.
Author: Adam Borowski <[email protected]>

--- packagekit-1.0.1.orig/backends/aptcc/apt-intf.cpp
+++ packagekit-1.0.1/backends/aptcc/apt-intf.cpp
@@ -890,7 +890,9 @@ void AptIntf::emitUpdateDetail(const pkg
                         GTimeVal dateTime = {0, 0};
                         gchar *date;
                         date = g_match_info_fetch_named(match_info, "date");
-                        g_warn_if_fail(RFC1123StrToTime(date, dateTime.tv_sec));
+                        time_t time;
+                        g_warn_if_fail(RFC1123StrToTime(date, time));
+                        dateTime.tv_sec = time;
                         g_free(date);
 
                         issued = g_time_val_to_iso8601(&dateTime);

Reply via email to