From d4638be7e2f3bc5435a04cd0b453b50bdadf3bed Mon Sep 17 00:00:00 2001 From: Thomas Koutcher Date: Tue, 30 Apr 2024 23:38:20 +0200 Subject: [PATCH] Fix compilation warnings with ncurses 6.5 ncurses 6.5 uses opaque typedefs by default. --- NEWS.adoc | 1 + include/tig/tig.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS.adoc b/NEWS.adoc index c520c257f..9096b8a41 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -11,6 +11,7 @@ Bug fixes: - Fix keybinding with +[cmd] not triggering view refreshing. (#1324) - Fix reopening the blame view from the main view. - Fix editing when stdin is redirected. (#1330) + - Fix compilation warnings with ncurses 6.5. tig-2.5.9 --------- diff --git a/include/tig/tig.h b/include/tig/tig.h index c830a897c..83cf0c7a4 100644 --- a/include/tig/tig.h +++ b/include/tig/tig.h @@ -39,10 +39,12 @@ #endif /* necessary on Snow Leopard to use WINDOW struct */ +#if defined(NCURSES_VERSION_PATCH) && NCURSES_VERSION_PATCH < 20240427 #ifdef NCURSES_OPAQUE #undef NCURSES_OPAQUE #endif #define NCURSES_OPAQUE 0 +#endif #include