From e679fa13d4658d06b818fa5b542e41567bb7bb2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net> Date: Sat, 13 Mar 2021 14:48:07 -0500 Subject: [PATCH] include curs_fix from ciolib.h to fix openSUSE Apparently, the ncurses in openSUSE Leap-15.2 has the following: Since we have a struct member named ESCDELAY, we can't actually set it at all when this macro is defined. The three possibilities to deal with this are: 1) Rename the ESCDELAY member. Likely the best option long-term, but I don't want to find everything and update it at this time. 2) Avoid using the ESCDELAY member #ifdef ESCDELAY Which makes it not work in the exact set of circumstances it makes sense in. 3) #include curs_fix.h from ciolib.h This actually renames the ESCDELAY member to _nc_ESCDELAY, but you won't be able to actually notice this. --- src/conio/ciolib.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/conio/ciolib.h b/src/conio/ciolib.h index 602c143318..0cac90b6c9 100644 --- a/src/conio/ciolib.h +++ b/src/conio/ciolib.h @@ -41,6 +41,16 @@ #include "gen_defs.h" #include "utf8_codepages.h" +#ifndef _WIN32 + /* This is included because it seems openSUSE Leap-15.2 apparently contains this: + * #define ESCDELAY _nc_ESCDELAY. + * which means we need to not set the ESCDELAY member (because we can't), or we + * need to rename the member to _nc_ESCDELAY. Do the second because it's very + * *very* slightly less stupid. + */ + #include "curs_fix.h" +#endif + #ifdef CIOLIBEXPORT #undef CIOLIBEXPORT #endif -- GitLab