p2p on 32-bit architectures
Sam Leffler
sleffler
Thu May 26 16:07:05 PDT 2011
Building w/ P2P support enabled for a 32-bit target yields these complaints:
p2p_supplicant.c: In function 'wpas_p2p_sd_request':
p2p_supplicant.c:1672: warning: cast to pointer from integer of different size
p2p_supplicant.c: In function 'wpas_p2p_sd_cancel_request':
p2p_supplicant.c:1702: warning: cast from pointer to integer of different size
The first issue is wpa_drv_p2p_sd_request's return value is being cast
to void * but the return value is u64 in driver_i.h:
static inline u64 wpa_drv_p2p_sd_request(struct wpa_supplicant *wpa_s,
const u8 *dst,
const struct wpabuf *tlvs)
This does not work unless we're ok blindly lopping off 32 bits.
The second complaint is the u64 cast:
nt wpas_p2p_sd_cancel_request(struct wpa_supplicant *wpa_s, void *req)
{
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_MGMT)
return wpa_drv_p2p_sd_cancel_request(wpa_s, (u64) req);
This needs to use uintptr_t or similar to be portable.
This makes me believe no-one's tried this on a 32-bit arch?
-Sam
More information about the Hostap
mailing list