$ git show --format=fuller --patch-with-stat --summary e810fc531bde4b7a7f772803251ca13c0e261c87
commit e810fc531bde4b7a7f772803251ca13c0e261c87
Author: itchka (Colin Close) <itchka@compuserve.com>
AuthorDate: Mon Oct 7 22:10:47 2019 +0100
Commit: itchka (Colin Close) <itchka@compuserve.com>
CommitDate: Mon Oct 7 22:10:47 2019 +0100
Fix pointer comparison
Fix c++11 non compliance
---
clang-build-fixes.patch | 41 +++++++++++++++++++++++++++++++++++++++++
slim.spec | 5 ++++-
2 files changed, 45 insertions(+), 1 deletion(-)
create mode 100644 clang-build-fixes.patch
diff --git a/clang-build-fixes.patch b/clang-build-fixes.patch
new file mode 100644
index 0000000..bc4cf3e
--- /dev/null
+++ b/clang-build-fixes.patch
@@ -0,0 +1,41 @@
+diff --git a/panel.cpp b/panel.cpp
+index 5057334..3ebd6ea 100644
+--- a/panel.cpp
++++ b/panel.cpp
+@@ -48,7 +48,7 @@ Panel::Panel(Display* dpy, int scr, Window root, Cfg* config,
+ gcm = GCGraphicsExposures;
+ gcv.graphics_exposures = False;
+ WinGC = XCreateGC(Dpy, Win, gcm, &gcv);
+- if (WinGC < 0) {
++ if (WinGC == NULL) {
+ cerr << APPNAME
+ << ": failed to create pixmap\n.";
+ exit(ERR_EXIT);
+diff --git a/slimlock.cpp b/slimlock.cpp
+index 04c4886..c63f956 100644
+--- a/slimlock.cpp
++++ b/slimlock.cpp
+@@ -74,9 +74,9 @@ die(const char *errstr, ...) {
+
+ int main(int argc, char **argv) {
+ if((argc == 2) && !strcmp("-v", argv[1]))
+- die(APPNAME"-"VERSION", © 2010-2012 Joel Burget\n");
++ die(APPNAME"-" VERSION ", © 2010-2012 Joel Burget\n");
+ else if(argc != 1)
+- die("usage: "APPNAME" [-v]\n");
++ die("usage: " APPNAME " [-v]\n");
+
+ void (*prev_fn)(int);
+
+@@ -92,9 +92,9 @@ int main(int argc, char **argv) {
+
+ // try /run/lock first, since i believe it's preferred
+ if (!stat("/run/lock", &statbuf))
+- lock_file = open("/run/lock/"APPNAME".lock", O_CREAT | O_RDWR, 0666);
++ lock_file = open("/run/lock/" APPNAME ".lock", O_CREAT | O_RDWR, 0666);
+ else
+- lock_file = open("/var/lock/"APPNAME".lock", O_CREAT | O_RDWR, 0666);
++ lock_file = open("/var/lock/" APPNAME ".lock", O_CREAT | O_RDWR, 0666);
+
+ int rc = flock(lock_file, LOCK_EX | LOCK_NB);
+
diff --git a/slim.spec b/slim.spec
index e052aa2..fb36578 100644
--- a/slim.spec
+++ b/slim.spec
@@ -15,6 +15,7 @@ Patch1: %{name}-1.3.3-config.patch
Patch7: slim-1.3.6-fix-CMakeLists.patch
Patch8: slim-1.3.5-fix-service-file.patch
Patch9: slim-1.3.6-systemd-session.patch
+Patch10: clang-build-fixes.patch
BuildRequires: cmake
BuildRequires: pkgconfig(xmu)
BuildRequires: pkgconfig(xft)
@@ -27,7 +28,7 @@ BuildRequires: gettext
BuildRequires: pam-devel
BuildRequires: pkgconfig(libpng16) >= 1.6
BuildRequires: pkgconfig(zlib)
-BuildRequires: pkgconfig(libsystemd-login)
+BuildRequires: pkgconfig(libsystemd)
Requires: pam >= 0.80
Requires: distro-theme
Provides: dm
@@ -57,6 +58,8 @@ Features included:
%apply_patches
%build
+#export CC=gcc
+#export CXX=g++
%global optflags %{optflags} -I/usr/include/freetype2
%cmake \