hplip: needs dynamic library
[buildroot-gz.git] / package / ipmitool / 0002-Avoid-wchar_t-redefinition.patch
blob99598e0a7dea14e94ff8a9b31b430c51f83316bf
1 From 7d1863b47877129376f37613d29d3a5ba084af66 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3 Date: Sat, 2 Apr 2016 19:45:14 +0200
4 Subject: [PATCH 2/3] Avoid wchar_t redefinition
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 The musl C library does not define _WCHAR_T. Use autoconf to check for wchar_t.
11 Upstream status: Pending
12 https://sourceforge.net/p/ipmitool/mailman/message/35007331/
14 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
15 ---
16 configure.ac | 2 ++
17 src/plugins/imb/imbapi.h | 7 ++++++-
18 2 files changed, 8 insertions(+), 1 deletion(-)
20 diff --git a/configure.ac b/configure.ac
21 index 1d74fcf..c2ba1eb 100644
22 --- a/configure.ac
23 +++ b/configure.ac
24 @@ -22,6 +22,8 @@ AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h sys/stat.h unistd.h paths.h])
25 AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/socket.h])
26 AC_CHECK_HEADERS([sys/byteorder.h byteswap.h])
28 +AC_CHECK_TYPES([wchar_t])
30 AC_C_CONST
31 AC_C_INLINE
32 AC_C_BIGENDIAN
33 diff --git a/src/plugins/imb/imbapi.h b/src/plugins/imb/imbapi.h
34 index 74975c6..ead8956 100644
35 --- a/src/plugins/imb/imbapi.h
36 +++ b/src/plugins/imb/imbapi.h
37 @@ -35,6 +35,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 *----------------------------------------------------------------------*/
39 #ifndef _WINDEFS_H
40 #define _WINDEFS_H
42 +#if HAVE_CONFIG_H
43 +# include <config.h>
44 +#endif
46 #ifndef FALSE
47 #define FALSE 0
48 #endif
49 @@ -46,7 +51,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50 #endif
51 #ifndef WIN32
52 /* WIN32 defines this in stdio.h */
53 -#ifndef _WCHAR_T
54 +#if !defined(HAVE_WCHAR_T)
55 #define _WCHAR_T
56 typedef long wchar_t;
57 #endif
58 --
59 2.8.0