From 3771a15b584dbc99cd28e09ed8e747778e3fa05a Mon Sep 17 00:00:00 2001 From: hubertf Date: Wed, 25 Sep 2002 10:23:44 +0000 Subject: Fix PR 18412: x11/xkbset dumps core if the XKB extension is not loaded --- x11/xkbset/patches/patch-ab | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 x11/xkbset/patches/patch-ab (limited to 'x11/xkbset/patches/patch-ab') diff --git a/x11/xkbset/patches/patch-ab b/x11/xkbset/patches/patch-ab new file mode 100644 index 00000000000..6f93803331a --- /dev/null +++ b/x11/xkbset/patches/patch-ab @@ -0,0 +1,15 @@ +$NetBSD: patch-ab,v 1.1 2002/09/25 10:23:45 hubertf Exp $ + +--- main.c.orig Thu Aug 17 06:36:15 2000 ++++ main.c +@@ -91,6 +91,10 @@ + } + + xkb = XkbGetKeyboard(display,XkbControlsMask,XkbUseCoreKbd); ++ if (xkb == 0) { ++ fprintf(stderr, "XKB not supported for display %s\n", getenv("DISPLAY")); ++ exit(1); ++ } + XkbGetControls(display, XkbAccessXTimeoutMask|XkbAllControlsMask, xkb); + + if (query) { -- cgit v1.2.3