From 147ec30fd6ab75b20ff4496dbcbf7f5469e86e99 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 9 Jul 2023 16:52:03 -0700 Subject: [PATCH 1/2] fix compilation with FreeBSD FreeBSD is checked for in two places and two duplicate functions are used. Just use the former. Signed-off-by: Rosen Penev --- src/terminal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal.c b/src/terminal.c index 1f7e58538..0898ad47b 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -490,7 +490,7 @@ int tty_fix () } #endif -#if defined (__APPLE__) || defined (__FreeBSD__) +#if defined (__APPLE__) static struct termios savemodes; static int havemodes = 0; From 88347540f3d52b461dd2f8f1b6d5d639e2490768 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 9 Jul 2023 16:53:42 -0700 Subject: [PATCH 2/2] include zlib.h Various types included in zlib.h such as gzFile are implicitly included with minizip. Get rid of this behavior and explicitly include zlib.h. Signed-off-by: Rosen Penev --- include/types.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/types.h b/include/types.h index 6fd4c4553..0a7179af6 100644 --- a/include/types.h +++ b/include/types.h @@ -17,11 +17,7 @@ #include #include #include - -// workaround to get the rid of "redefinition of typedef 'Byte'" build warning -#if !defined (__APPLE__) -#include "zlib.h" -#endif +#include #if !defined(__MACTYPES__) #define __MACTYPES__