aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2016-01-21 23:15:13 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-06 13:26:48 (GMT)
commit0ae86f90430b38d4bfb2832585c31d3efa7f6b84 (patch)
tree116cfcfd678a1ba4069dab58a903f56a5e4af80e /src/utils
parent592790bf15da32efc00b5aa266242a3b4c736ede (diff)
downloadhostap-0ae86f90430b38d4bfb2832585c31d3efa7f6b84.zip
hostap-0ae86f90430b38d4bfb2832585c31d3efa7f6b84.tar.gz
hostap-0ae86f90430b38d4bfb2832585c31d3efa7f6b84.tar.bz2
wpa_supplicant: Fix couple of C++ compiler errors with header files
Need to include these headers in C++ files for adding a binder interface to wpa_supplicant. So, fix the following C++ compiler errors in them: 1. Add explicit C-style casts in wpa_buf.h header. 2. Move the nested definition of wpa_driver_scan_ssid in driver.h outside of wpa_driver_scan_params because it is used in another structure below. Signed-off-by: Roshan Pius <rpius@google.com>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/wpabuf.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/utils/wpabuf.h b/src/utils/wpabuf.h
index c3ef1ba..9cd8a07 100644
--- a/src/utils/wpabuf.h
+++ b/src/utils/wpabuf.h
@@ -81,7 +81,7 @@ static inline const void * wpabuf_head(const struct wpabuf *buf)
static inline const u8 * wpabuf_head_u8(const struct wpabuf *buf)
{
- return wpabuf_head(buf);
+ return (const u8 *) wpabuf_head(buf);
}
/**
@@ -96,42 +96,42 @@ static inline void * wpabuf_mhead(struct wpabuf *buf)
static inline u8 * wpabuf_mhead_u8(struct wpabuf *buf)
{
- return wpabuf_mhead(buf);
+ return (u8 *) wpabuf_mhead(buf);
}
static inline void wpabuf_put_u8(struct wpabuf *buf, u8 data)
{
- u8 *pos = wpabuf_put(buf, 1);
+ u8 *pos = (u8 *) wpabuf_put(buf, 1);
*pos = data;
}
static inline void wpabuf_put_le16(struct wpabuf *buf, u16 data)
{
- u8 *pos = wpabuf_put(buf, 2);
+ u8 *pos = (u8 *) wpabuf_put(buf, 2);
WPA_PUT_LE16(pos, data);
}
static inline void wpabuf_put_le32(struct wpabuf *buf, u32 data)
{
- u8 *pos = wpabuf_put(buf, 4);
+ u8 *pos = (u8 *) wpabuf_put(buf, 4);
WPA_PUT_LE32(pos, data);
}
static inline void wpabuf_put_be16(struct wpabuf *buf, u16 data)
{
- u8 *pos = wpabuf_put(buf, 2);
+ u8 *pos = (u8 *) wpabuf_put(buf, 2);
WPA_PUT_BE16(pos, data);
}
static inline void wpabuf_put_be24(struct wpabuf *buf, u32 data)
{
- u8 *pos = wpabuf_put(buf, 3);
+ u8 *pos = (u8 *) wpabuf_put(buf, 3);
WPA_PUT_BE24(pos, data);
}
static inline void wpabuf_put_be32(struct wpabuf *buf, u32 data)
{
- u8 *pos = wpabuf_put(buf, 4);
+ u8 *pos = (u8 *) wpabuf_put(buf, 4);
WPA_PUT_BE32(pos, data);
}