Skip to content

Commit 584e66b

Browse files
committed
Fix a terminal crash on OpenBSD
It seems to not like an empty term structure.
1 parent da85a1b commit 584e66b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ MAIN_SOURCES = src/main/main.c src/main/cmds.c src/main/bindings.c src/main/sear
4949

5050
# HACK: added to MAIN_SOURCES to not be picked up in tests
5151
# since they have their own implementation
52-
.if $(HAS_EPOLL) == true
52+
.if "$(HAS_EPOLL)" == true
5353
MAIN_SOURCES += src/dged/reactor-epoll.c
5454
.elif $(HAS_KQUEUE) == true
5555
MAIN_SOURCES += src/dged/reactor-kqueue.c

src/dged/display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ bool display_initialize(struct display *display) {
200200
display->orig_term = orig_term;
201201

202202
// set terminal to raw mode
203-
struct termios term = {0};
203+
struct termios term = orig_term;
204204
cfmakeraw(&term);
205205

206206
if (tcsetattr(0, TCSADRAIN, &term) < 0) {

0 commit comments

Comments
 (0)