Package: src:libgnomeui
Version: 2.24.5-3
Severity: normal
Tags: patch
Justification: fails to build from source (but built successfully in the past)
Hi!
I'm afraid that libgnomeui has regressed due to use of -Werror. It fails
to build on any architecture where time_t has a different size than long.
That's not the case on any of current Debian release arch, but, per Linus'
decree, applies to any new 32-bit arch (because Y2k38).
Sadly, this regression hasn't been noticed for a year, as -ports archs are
allowed to go out of sync from release ones, and any reverse-dependencies
built happily using 2.24.5-2 which used different build flags.
A readable patch attached. This one will fail in 23 years, but this code
needs to be rewritten for any arch other than x32 anyway. A proper patch
would use hairy casts as there's no standard printf format string for
time_t.
-- 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.2-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: cast time_t printfs
Upstream code uses printf("%ld") with a time_t argument. This causes a
warning if time_t is a different type than long, which causes a FTBFS
under -Werror.
Author: Adam Borowski <[email protected]>
--- libgnomeui-2.24.5.orig/libgnomeui/gnome-thumbnail.c
+++ libgnomeui-2.24.5/libgnomeui/gnome-thumbnail.c
@@ -863,7 +863,7 @@ gnome_thumbnail_factory_save_thumbnail (
}
close (tmp_fd);
- g_snprintf (mtime_str, 21, "%ld", original_mtime);
+ g_snprintf (mtime_str, 21, "%ld", (long)original_mtime);
width = gdk_pixbuf_get_option (thumbnail, "tEXt::Thumb::Image::Width");
height = gdk_pixbuf_get_option (thumbnail, "tEXt::Thumb::Image::Height");
@@ -970,7 +970,7 @@ gnome_thumbnail_factory_create_failed_th
}
close (tmp_fd);
- g_snprintf (mtime_str, 21, "%ld", mtime);
+ g_snprintf (mtime_str, 21, "%ld", (long)mtime);
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 1, 1);
saved_ok = gdk_pixbuf_save (pixbuf,
tmp_path,