don't define wchar_t on c++
[musl] / arch / x86_64 / bits / alltypes.h.sh
index af2a4d9..10fc3d5 100755 (executable)
@@ -21,7 +21,9 @@ TYPEDEF long ssize_t;
 TYPEDEF long ptrdiff_t;
 TYPEDEF __builtin_va_list va_list;
 
+#ifndef __cplusplus
 TYPEDEF int wchar_t;
+#endif
 TYPEDEF int wint_t;
 TYPEDEF int wctrans_t;
 TYPEDEF int wctype_t;
@@ -55,7 +57,7 @@ TYPEDEF unsigned long uintptr_t;
 
 TYPEDEF long time_t;
 TYPEDEF long suseconds_t;
-STRUCT timeval { time_t tv_sec; int tv_usec; };
+STRUCT timeval { time_t tv_sec; long tv_usec; };
 STRUCT timespec { time_t tv_sec; long tv_nsec; };
 
 TYPEDEF int pid_t;