Skip to content

Commit

Permalink
kmscon: fix build with glibc 2.26
Browse files Browse the repository at this point in the history
Tracking issue: #31696
  • Loading branch information
orivej committed Nov 16, 2017
1 parent 30fa830 commit 5018c27
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/os-specific/linux/kmscon/default.nix
Expand Up @@ -33,6 +33,8 @@ stdenv.mkDerivation rec {
libxslt
];

patches = [ ./kmscon-8-glibc-2.26.patch ];

# FIXME: Remove as soon as kmscon > 8 comes along.
postPatch = ''
sed -i -e 's/libsystemd-daemon libsystemd-login/libsystemd/g' configure
Expand All @@ -45,6 +47,8 @@ stdenv.mkDerivation rec {
"--with-renderers=bbulk,gltex,pixman"
];

enableParallelBuilding = true;

meta = {
description = "KMS/DRM based System Console";
homepage = http://www.freedesktop.org/wiki/Software/kmscon/;
Expand Down
25 changes: 25 additions & 0 deletions pkgs/os-specific/linux/kmscon/kmscon-8-glibc-2.26.patch
@@ -0,0 +1,25 @@
diff --git a/src/pty.c b/src/pty.c
index 3494104..1443f4a 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -299,7 +299,7 @@ static void setup_child(int master, struct winsize *ws)
if (ret)
log_warn("cannot reset blocked signals: %m");

- for (i = 1; i < SIGUNUSED; ++i)
+ for (i = 1; i < SIGSYS; ++i)
signal(i, SIG_DFL);

ret = grantpt(master);
diff --git a/src/uterm_vt.c b/src/uterm_vt.c
index af377f5..fbe9e76 100644
--- a/src/uterm_vt.c
+++ b/src/uterm_vt.c
@@ -40,6 +40,7 @@
#include <sys/ioctl.h>
#include <sys/signalfd.h>
#include <sys/stat.h>
+#include <sys/sysmacros.h>
#include <termios.h>
#include <time.h>
#include <unistd.h>

0 comments on commit 5018c27

Please sign in to comment.