fix: complie errors

This commit is contained in:
Shengliang Guan 2024-11-04 13:37:23 +08:00
parent 83f96706c7
commit b762aec161
2 changed files with 5 additions and 1 deletions

View File

@ -22,7 +22,7 @@ extern "C" {
typedef wchar_t TdWchar; typedef wchar_t TdWchar;
typedef int32_t TdUcs4; typedef int32_t TdUcs4;
#ifndef DISALLOW_NCHAR_WITHOUT_ICONV #if !defined(DISALLOW_NCHAR_WITHOUT_ICONV) && defined(DARWIN)
#include "iconv.h" #include "iconv.h"
#else #else
typedef void *iconv_t; typedef void *iconv_t;

View File

@ -17,6 +17,10 @@
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "os.h" #include "os.h"
#ifndef DISALLOW_NCHAR_WITHOUT_ICONV
#include "iconv.h"
#endif
extern int wcwidth(wchar_t c); extern int wcwidth(wchar_t c);
extern int wcswidth(const wchar_t *s, size_t n); extern int wcswidth(const wchar_t *s, size_t n);