diff --git a/patches/xorg-server/jinx-working-patch.patch b/patches/xorg-server/jinx-working-patch.patch index 381c9ef2..d41460d8 100644 --- a/patches/xorg-server/jinx-working-patch.patch +++ b/patches/xorg-server/jinx-working-patch.patch @@ -788,35 +788,74 @@ index 0000000..f4d19d9 +} diff --git xorg-server-workdir/hw/xfree86/os-support/astral/astral_init.c xorg-server-workdir/hw/xfree86/os-support/astral/astral_init.c new file mode 100644 -index 0000000..f0d9039 +index 0000000..ce5a72f --- /dev/null +++ xorg-server-workdir/hw/xfree86/os-support/astral/astral_init.c -@@ -0,0 +1,32 @@ +@@ -0,0 +1,71 @@ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + ++#include ++#include ++#include ++ ++#include "xf86.h" +#include "xf86_OSlib.h" ++#include "xf86Priv.h" ++ ++static int NoConsoleLock; ++ ++static int ++astralSetConsoleLock(int locked) ++{ ++ int name[] = { SYS_CTL_KERN, SYS_CTL_KERN_CONSOLE_LOCK }; ++ ++ return sysctl(name, 2, NULL, NULL, &locked, sizeof(locked)); ++} + +void +xf86OpenConsole(void) +{ ++ if (serverGeneration != 1) ++ return; ++ ++ if (NoConsoleLock) ++ return; ++ ++ if (astralSetConsoleLock(1) < 0) ++ FatalError("xf86OpenConsole: console lock failed: %s\n", ++ strerror(errno)); +} + +void +xf86CloseConsole(void) +{ ++ if (NoConsoleLock) ++ return; ++ ++ if (astralSetConsoleLock(0) < 0) { ++ xf86Msg(X_WARNING, "xf86CloseConsole: console unlock failed: %s\n", ++ strerror(errno)); ++ return; ++ } +} + +int +xf86ProcessArgument(int argc, char *argv[], int i) +{ ++ if (!strcmp(argv[i], "-noconsolelock")) { ++ NoConsoleLock = 1; ++ return 1; ++ } ++ + return 0; +} + +void +xf86UseMsg(void) +{ ++ ErrorF("-noconsolelock don't lock the kernel console\n"); +} + +void diff --git a/recipes/xorg-server b/recipes/xorg-server index 1a2b16cd..62608df2 100644 --- a/recipes/xorg-server +++ b/recipes/xorg-server @@ -1,5 +1,5 @@ name=xorg-server -revision=1 +revision=2 from_source=xorg-server imagedeps="meson ninja-build build-essential" hostdeps="xgcc xbinutils pkgconfig autoconf automake libtool pkgconfig util-macros xtrans fontutil"