--- stuff.h	Wed Feb 23 13:01:18 2005
+++ stuff.h	Wed Feb 23 13:01:39 2005
@@ -174,7 +174,7 @@
 #include <sys/stat.h>
 #endif
 
-#if HAVE_TERMIOS_H && ( (CONFIG_CONSOLE) || (CONFIG_TG == TG_BICURSES) )
+#if HAVE_TERMIOS_H && ( (CONFIG_CONSOLE) || (CONFIG_TG == TG_BICURSES) ) && !__APPLE__
 #include <termios.h>
 #define MIGHT_DO_TERMIOS 1
 #else


https://github.com/openbsd/ports/blob/master/www/retawq/patches/patch-stuff_h

--- stuff.h	Sun Mar 19 12:51:21 2006
+++ stuff.h	Fri Nov 14 20:46:15 2008
@@ -133,6 +133,7 @@
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
+#include <inttypes.h>
 
 #if STDC_HEADERS
 #include <stdlib.h>
@@ -894,8 +895,8 @@ typedef signed short tMbsIndex;
 
 /* CHECKME: use a sizeof() test with configure to avoid (_bogus_!) compiler
    warnings on 64-bit machines! */
-#define MY_INT_TO_POINTER(x) ( (void*) ((int) (x)) )
-#define MY_POINTER_TO_INT(x) ((int) (x))
+#define MY_INT_TO_POINTER(x) ( (void*) ((uintptr_t) (x)) )
+#define MY_POINTER_TO_INT(x) ((uintptr_t) (x))
 
 /* Suppress _bogus_ compiler warnings about uninitialized variables (in order
    to make all "real" warnings more visible): */
