From ffa24eb3610dc2853c1a468b8aa2fd327cd0d3fa Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Tue, 23 Feb 2021 11:01:41 -0600 Subject: [PATCH] Fix build on Solaris (and hopefully OpenIndiana) * memset/memzero needs cstring/string.h (again) * winsize_t requires an impl from With this patch, I was able to get fish master to build on Solaris 11.4 without any additional dependencies (after installing gcc 7, git, and cmake). I think the ncurses dependency can be dropped from the OpenIndiana package? --- src/fds.cpp | 4 ++-- src/termsize.cpp | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/fds.cpp b/src/fds.cpp index 70c9ae232..85fb88965 100644 --- a/src/fds.cpp +++ b/src/fds.cpp @@ -8,12 +8,12 @@ #include #include +#include + #include "common.h" #include "flog.h" #include "wutil.h" -#include - #ifdef HAVE_EVENTFD #include #endif diff --git a/src/termsize.cpp b/src/termsize.cpp index a4ce9255d..f1547632d 100644 --- a/src/termsize.cpp +++ b/src/termsize.cpp @@ -7,6 +7,10 @@ #include "wcstringutil.h" #include "wutil.h" +#ifdef HAVE_WINSIZE +#include +#endif + // A counter which is incremented every SIGWINCH, or when the tty is otherwise invalidated. static volatile uint32_t s_tty_termsize_gen_count{0}; @@ -25,7 +29,7 @@ static maybe_t read_termsize_from_tty() { FLOGF(term_support, L"Terminal has 0 rows, falling back to default height"); winsize.ws_row = termsize_t::DEFAULT_HEIGHT; } - result = termsize_t{winsize.ws_col, winsize.ws_row}; + result = termsize_t(winsize.ws_col, winsize.ws_row); } #endif return result;