commit 6f9272021fd3925a09a9e445d2ee890d29017a28
parent c80a983e8995a59fc34ca4c2f601c9c00fda5133
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Wed, 5 Mar 2025 08:52:36 +0100
libc/wchar: Fix mbstate_t definition for darwin
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/bits/darwin/sys/cdefs.h b/include/bits/darwin/sys/cdefs.h
@@ -1,7 +1,8 @@
#ifdef _NEED_MBSTATE_T
#ifndef _MBSTATE_T
-typedef union {
- char __mbstate8[128];
+typedef struct {
+ unsigned char state[MB_CUR_MAX];
+ size_t count;
} mbstate_t;
#define _MBSTATE_T
#endif
diff --git a/include/wchar.h b/include/wchar.h
@@ -9,8 +9,8 @@
#define _NEED_WINT
#define _NEED_VA_LIST
#define _NEED_MBSTATE_T
-#include <sys/cdefs.h>
#include <arch/cdefs.h>
+#include <sys/cdefs.h>
struct tm;
struct _FILE;