Control: tags 984339 + patch
Control: tags 984339 + pending

Dear maintainer,

To resolve the sitatuation, I've prepared an NMU for slim (versioned as
1.3.6-5.3), upload to DELAYED/2 will follow shortly. Please feel free to
tell me if I should delay it longer.

Regards.

diff -Nru slim-1.3.6/debian/changelog slim-1.3.6/debian/changelog
--- slim-1.3.6/debian/changelog 2020-09-25 13:22:22.000000000 +0200
+++ slim-1.3.6/debian/changelog 2022-01-04 01:43:19.000000000 +0100
@@ -1,3 +1,10 @@
+slim (1.3.6-5.3) unstable; urgency=high
+
+  * Non-maintainer upload
+  * Fix build error with gcc 11. Closes: #984339
+
+ -- Christoph Biedl <debian.a...@manchmal.in-ulm.de>  Tue, 04 Jan 2022 
07:02:51 +0100
+
 slim (1.3.6-5.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru slim-1.3.6/debian/patches/series slim-1.3.6/debian/patches/series
--- slim-1.3.6/debian/patches/series    2017-05-02 15:42:52.000000000 +0200
+++ slim-1.3.6/debian/patches/series    2022-01-04 00:58:36.000000000 +0100
@@ -6,3 +6,4 @@
 fix-systemd-service.patch
 manpage-formatting-fixes.patch
 fix-missing-plymouth-handling.patch
+slim-1.3.6-gcc11.patch
diff -Nru slim-1.3.6/debian/patches/slim-1.3.6-gcc11.patch 
slim-1.3.6/debian/patches/slim-1.3.6-gcc11.patch
--- slim-1.3.6/debian/patches/slim-1.3.6-gcc11.patch    1970-01-01 
01:00:00.000000000 +0100
+++ slim-1.3.6/debian/patches/slim-1.3.6-gcc11.patch    2022-01-04 
01:42:15.000000000 +0100
@@ -0,0 +1,33 @@
+Subject: Fix build with GCC 11
+Author: Martin Väth
+Date: 2021-05-03
+Bug-Debian: https://bugs.debian.org/984339
+Bug-Gentoo: https://bugs.gentoo.org/786498
+
+    From the Gentoo bug ticket:
+
+    Comment to the patch, since it might look wrong at a first glance:
+
+    All documentation about the return value of XCreateGC I found states
+    that it returns a proper pointer and in the error case sets some
+    failure stat. In particular, I found no documentation that it
+    returns a "negative" pointer.
+
+    The cleanest patch would probably be to check the failure stat, but
+    since I am not sure about it, the most reasonable analogous check to
+    the original code is to check whether we get a null pointer
+    returned. (Very likely, neither the original code nor the patch work
+    properly in the error case, but at least the patch fixes the
+    compilation issue and causes no regression in the non-error case.)
+
+--- a/panel.cpp
++++ b/panel.cpp
+@@ -48,7 +48,7 @@
+               gcm = GCGraphicsExposures;
+               gcv.graphics_exposures = False;
+               WinGC = XCreateGC(Dpy, Win, gcm, &gcv);
+-              if (WinGC < 0) {
++              if (WinGC == 0) {
+                       cerr << APPNAME
+                               << ": failed to create pixmap\n.";
+                       exit(ERR_EXIT);

Attachment: signature.asc
Description: PGP signature

Reply via email to