kumquat-buildroot/package/ipmiutil/0004-avoid-wchar-t-redefinition.patch

20 lines
618 B
Diff
Raw Normal View History

Avoid wchar_t redefinition
The musl C library does not define _WCHAR_T. Check also for compiler defined
__WCHAR_TYPE__.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
diff -Nuar ipmiutil-2.9.5-orig/util/imb_api.h ipmiutil-2.9.5/util/imb_api.h
--- ipmiutil-2.9.5-orig/util/imb_api.h 2014-11-04 19:46:11.000000000 +0200
+++ ipmiutil-2.9.5/util/imb_api.h 2015-09-29 07:49:40.799063825 +0300
@@ -49,7 +49,7 @@
/* DOS defines wchar_t in stdlib.h */
#else
// defined(LINUX) | defined(SOLARIS)
-#ifndef _WCHAR_T
+#if !defined(_WCHAR_T) && !defined(__WCHAR_TYPE__)
#define _WCHAR_T
typedef long wchar_t;
#endif