Package: gdpc
Version: 2.2.5-4
Severity: important
Tags: patch
User: [email protected]
Usertags: origin-ubuntu xenial ubuntu-patch
Hi,
As you can see in the build log checks for gdpc in Debian [1], the build logs
contain implicit function declarations due to the use of deprecated glib
functions. The implicit declaration of functions can cause problems on 64-bit
architectures, as described here [2].
Implicit function declarations actually cause an FTBFS on 64-bit architectures
in Ubuntu, which prompted the attached patch.
In Ubuntu, the attached patch was applied to achieve the following:
* Merge from Debian unstable. Remaining changes:
- debian/patches/41_glib_deprecated_funcs.patch: Converted uses of
deprecated glib functions, fixing FTBFS on 64-bit buildds.
Thanks for considering the patch.
Logan Rosen
[1] https://qa.debian.org/bls/packages/g/gdpc.html
[2] https://wiki.debian.org/ImplicitPointerConversions
-- System Information:
Debian Release: stretch/sid
APT prefers xenial-updates
APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500,
'xenial'), (100, 'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.4.0-2-generic (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru gdpc-2.2.5/debian/patches/41_glib_deprecated_funcs.patch gdpc-2.2.5/debian/patches/41_glib_deprecated_funcs.patch
--- gdpc-2.2.5/debian/patches/41_glib_deprecated_funcs.patch 1969-12-31 19:00:00.000000000 -0500
+++ gdpc-2.2.5/debian/patches/41_glib_deprecated_funcs.patch 2013-12-20 21:16:20.000000000 -0500
@@ -0,0 +1,44 @@
+Index: gdpc-2.2.5/main.c
+===================================================================
+--- gdpc-2.2.5.orig/main.c 2009-04-21 14:03:07.000000000 -0400
++++ gdpc-2.2.5/main.c 2013-04-07 21:21:46.208492431 -0400
+@@ -848,9 +848,9 @@
+ #endif
+
+ for (i=0;i<NUMFRAMES;i++) {
+- params->frameready[i] = g_mutex_new();
++ g_mutex_init (params->frameready[i]);
+ g_mutex_lock (params->frameready[i]);
+- params->framedrawn[i] = g_mutex_new();
++ g_mutex_init (params->framedrawn[i]);
+ g_mutex_unlock (params->framedrawn[i]);
+ params->framedata[i] = NULL;
+ }
+@@ -860,15 +860,15 @@
+ printf("Initialising filewait/EOF semaphores.\n");
+ #endif
+
+- params->filewait = g_mutex_new();
++ g_mutex_init (params->filewait);
+ g_mutex_lock (params->filewait);
+- params->atEnd = g_mutex_new();
++ g_mutex_init (params->atEnd);
+
+ #if Debug
+ printf("Starting filereading thread.\n");
+ #endif
+
+- th_a = g_thread_create ((GThreadFunc) readinput, (gpointer) params, TRUE, NULL);
++ th_a = g_thread_try_new ("some_thread", (GThreadFunc) readinput, (gpointer) params, NULL);
+ if (th_a == NULL) {
+ fprintf(stderr, "Creating read thread failed.\n");
+ gtk_main_quit ();
+@@ -927,8 +927,6 @@
+ /* Start gtk initialization. */
+ gtk_init (&argc, &argv);
+
+- g_thread_init(NULL);
+-
+ printf("\n gdpc version "GDPCVER", Copyright (C) 2000 Jonas Frantz\n");
+ printf(" gdpc comes with ABSOLUTELY NO WARRANTY; for details\n");
+ printf(" check out the documentation. This is free software, and\n");
diff -Nru gdpc-2.2.5/debian/patches/series gdpc-2.2.5/debian/patches/series
--- gdpc-2.2.5/debian/patches/series 2016-01-24 15:50:17.000000000 -0500
+++ gdpc-2.2.5/debian/patches/series 2016-02-18 01:13:27.000000000 -0500
@@ -1,4 +1,5 @@
20_Makefile_options.patch
30_gdk_enable_deprecated.patch
40_fix_gcc4.8_build.patch
+41_glib_deprecated_funcs.patch
hardening.patch