summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2024-07-11 11:48:20 +0200
committerGitHub <noreply@github.com>2024-07-11 11:48:20 +0200
commit5dfdd28292c8e28b787eecd475c585a3fa2e379c (patch)
treef5ab0f14b5f9f445c7d556ba6a1e16d12e75bebd
parentc832d2b857d4174d17247de837426d4cfc95ec2f (diff)
downloadluasystem-5dfdd28292c8e28b787eecd475c585a3fa2e379c.zip
fix(term): headers on yet another MinGW version (#30)
-rw-r--r--src/term.c3
-rw-r--r--src/wcwidth.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/term.c b/src/term.c
index 3db8d0c..1bb6c75 100644
--- a/src/term.c
+++ b/src/term.c
@@ -19,6 +19,7 @@
# ifndef _MSC_VER
# include <conio.h>
# include <unistd.h>
+# include <stddef.h>
# endif
#else
# include <termios.h>
@@ -27,9 +28,9 @@
# include <fcntl.h>
# include <sys/ioctl.h>
# include <unistd.h>
-# include <wchar.h>
# include <locale.h>
#endif
+#include <wchar.h>
// Windows does not have a wcwidth function, so we use compatibilty code from
diff --git a/src/wcwidth.h b/src/wcwidth.h
index f2fee11..6cb6f6d 100644
--- a/src/wcwidth.h
+++ b/src/wcwidth.h
@@ -9,6 +9,7 @@
#ifdef _WIN32
#include <stdint.h>
+#include <stddef.h>
typedef uint32_t mk_wchar_t; // Windows wchar_t can be 16-bit, we need 32-bit
#else
#include <wchar.h>