kumquat-buildroot/package/ipmiutil/0004-avoid-wchar-t-redefinition.patch
Baruch Siach f9c2858df1 ipmiutil: fix musl build issues
Add patches fixing a number of build failures under musl.

The first patch fixes the following autobuild failures:
http://autobuild.buildroot.net/results/bc8/bc8f97f0739e5b842057fdf60eb9309c3e30fac1/
http://autobuild.buildroot.net/results/937/937163f988bb3680630544f6c0ed45b18bc83511/
http://autobuild.buildroot.net/results/862/862af4c6be4b78e65528195305653eedac4163c6/

and others.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-09-29 19:43:31 +02:00

20 lines
618 B
Diff

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