forked from pool/makedumpfile
Use termios instead of obsolete termio #4
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 28 08:20:59 UTC 2025 - Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
- use-termios.patch: Use termios instead of obsolete termio
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 18 12:40:21 UTC 2025 - Petr Tesařík <ptesarik@suse.com>
|
Fri Jul 18 12:40:21 UTC 2025 - Petr Tesařík <ptesarik@suse.com>
|
||||||
|
|
||||||
|
@@ -34,13 +34,14 @@ Summary: Partial kernel dump
|
|||||||
License: GPL-2.0-only
|
License: GPL-2.0-only
|
||||||
Group: System/Kernel
|
Group: System/Kernel
|
||||||
URL: https://github.com/makedumpfile/makedumpfile
|
URL: https://github.com/makedumpfile/makedumpfile
|
||||||
Source: https://github.com/makedumpfile/makedumpfile/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.xz
|
Source: https://github.com/makedumpfile/makedumpfile/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
Source1: https://github.com/lucchouina/eppic/archive/%{eppic_commit}.tar.gz#/eppic-%{eppic_commit}.tar.gz
|
Source1: https://github.com/lucchouina/eppic/archive/%{eppic_commit}.tar.gz#/eppic-%{eppic_commit}.tar.gz
|
||||||
Source99: %{name}-rpmlintrc
|
Source99: %{name}-rpmlintrc
|
||||||
Patch0: %{name}-override-libtinfo.patch
|
Patch0: %{name}-override-libtinfo.patch
|
||||||
Patch1: %{name}-ppc64-VA-range-SUSE.patch
|
Patch1: %{name}-ppc64-VA-range-SUSE.patch
|
||||||
Patch2: %{name}-PN_XNUM.patch
|
Patch2: %{name}-PN_XNUM.patch
|
||||||
Patch3: %{name}-fix-multi-threading-data-race.patch
|
Patch3: %{name}-fix-multi-threading-data-race.patch
|
||||||
|
Source2: use-termios.patch
|
||||||
BuildRequires: libbz2-devel
|
BuildRequires: libbz2-devel
|
||||||
BuildRequires: libdw-devel
|
BuildRequires: libdw-devel
|
||||||
BuildRequires: libelf-devel
|
BuildRequires: libelf-devel
|
||||||
@@ -67,7 +68,8 @@ via gdb or crash utility.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%if %{build_eppic}
|
%if %{build_eppic}
|
||||||
%autosetup -p1 -b1
|
%{autosetup -p1 -b1}
|
||||||
|
patch -d ../eppic-%{eppic_commit} -p1 < %{SOURCE2}
|
||||||
%else
|
%else
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
%endif
|
%endif
|
||||||
|
50
use-termios.patch
Normal file
50
use-termios.patch
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
Index: eppic-63c2a2072464d774097a1a6cc1d2e98290f89c49/libeppic/eppic_builtin.c
|
||||||
|
===================================================================
|
||||||
|
--- eppic-63c2a2072464d774097a1a6cc1d2e98290f89c49.orig/libeppic/eppic_builtin.c
|
||||||
|
+++ eppic-63c2a2072464d774097a1a6cc1d2e98290f89c49/libeppic/eppic_builtin.c
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
#include <string.h>
|
||||||
|
-#include <termio.h>
|
||||||
|
+#include <termios.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
@@ -166,19 +166,19 @@ value_t *
|
||||||
|
eppic_getchar(void)
|
||||||
|
{
|
||||||
|
char c;
|
||||||
|
-struct termio tio, stio;
|
||||||
|
+struct termios tio, stio;
|
||||||
|
int in=fileno(stdin);
|
||||||
|
|
||||||
|
- if(ioctl(in, TCGETA, &tio)) c=255;
|
||||||
|
+ if(tcgetattr(in, &tio)) c=255;
|
||||||
|
else {
|
||||||
|
stio=tio;
|
||||||
|
tio.c_lflag &= ~(ICANON | ECHO);
|
||||||
|
tio.c_iflag &= ~(ICRNL | INLCR);
|
||||||
|
tio.c_cc[VMIN] = 1;
|
||||||
|
tio.c_cc[VTIME] = 0;
|
||||||
|
- ioctl(in, TCSETA, &tio);
|
||||||
|
+ tcsetattr(in, TCSANOW, &tio);
|
||||||
|
c=getc(stdin);
|
||||||
|
- ioctl(in, TCSETA, &stio);
|
||||||
|
+ tcsetattr(in, TCSANOW, &stio);
|
||||||
|
}
|
||||||
|
return eppic_defbtype(eppic_newval(), (ull)c);
|
||||||
|
}
|
||||||
|
Index: eppic-63c2a2072464d774097a1a6cc1d2e98290f89c49/libeppic/eppic_util.c
|
||||||
|
===================================================================
|
||||||
|
--- eppic-63c2a2072464d774097a1a6cc1d2e98290f89c49.orig/libeppic/eppic_util.c
|
||||||
|
+++ eppic-63c2a2072464d774097a1a6cc1d2e98290f89c49/libeppic/eppic_util.c
|
||||||
|
@@ -17,7 +17,7 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <curses.h>
|
||||||
|
#include <term.h>
|
||||||
|
-#include <termio.h>
|
||||||
|
+#include <sys/ioctl.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <malloc.h>
|
Reference in New Issue
Block a user