From efce51a194a7a05860a4d489ccb3f3b7c4d5985a Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Fri, 28 Apr 2023 17:25:22 -0400 Subject: gnu: slim: Fix build failure with GCC-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC-11 sniffed out a long-standing bug where a pointer was being tested for a negative value, which is impossible. Instead, check for NULL, which is how the error result is actually returned. See https://github.com/iwamatsu/slim/issues/14 for details. Fixes . * gnu/packages/display-managers.scm (slim) [fix-0-pointer-comparison]: new phase Signed-off-by: Ludovic Courtès --- gnu/packages/display-managers.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index b0d388f1bc..c1a08e8553 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -475,7 +475,11 @@ (define-public slim ;; The build system's logic here is: if "Linux", then ;; "systemd". Strip that. "")) - #t))) + #t)) + (add-before 'configure 'fix-0-pointer-comparison + (lambda _ + (substitute* "panel.cpp" + (("WinGC < 0") "WinGC == NULL"))))) #:configure-flags '("-DUSE_PAM=yes" "-DUSE_CONSOLEKIT=no") #:tests? #f)) -- cgit v1.2.3