File x3270-fix-sigill-with-screen_changed-variable.patch of Package x3270.9449
From: Sebastian Parschauer <sparschauer@suse.de>
Date: Tue, 23 Oct 2018 14:45:37 +0200
Subject: c3270: Fix SIGILL with screen_changed variable
References: bsc#1104013
Patch-mainline: 3.3.14alpha1
The screen_changed variable is defined as a Boolean (char) in
c3270-3.3/ctlr.c but it is used with "extern int" in other files.
This causes c3270 to crash with "Illegal instruction" when calling
it without any parameters on s390x.
So use "extern Boolean" instead as a minimal fix. The wc3270 client
is affected as well but not relevant for SLES.
This is based on svn://svn.code.sf.net/p/x3270/x3270/trunk@1112:
================================================
r1112 | pdm | 2013-10-19 03:40:40 +0200 (Sa, 19 Okt 2013) | 1 line
Some header file clean-up
================================================
Signed-off-by: Sebastian Parschauer <sparschauer@suse.de>
---
c3270-3.3/keypad.c | 2 +-
c3270-3.3/menubar.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: c3270-3.3/keypad.c
===================================================================
--- a/c3270-3.3/keypad.c
+++ b/c3270-3.3/keypad.c
@@ -52,7 +52,7 @@
# include "windows.h"
#endif /*]*/
-extern int screen_changed; /* XXX Hack! */
+extern Boolean screen_changed; /* XXX Hack! */
/* Sensitivity map: A rectangular region and a callback function. */
typedef struct {
Index: c3270-3.3/menubar.c
===================================================================
--- a/c3270-3.3/menubar.c
+++ b/c3270-3.3/menubar.c
@@ -73,7 +73,7 @@
# include "windows.h"
#endif /*]*/
-extern int screen_changed; /* XXX: Hack! */
+extern Boolean screen_changed; /* XXX: Hack! */
/*
* The menus look like this: