[PATCH] Update wireless_copy.h to Version 22

Dmitry Shmidt dimitrysh
Fri Feb 25 10:04:40 PST 2011


On Fri, Feb 25, 2011 at 3:36 AM, Jouni Malinen <j at w1.fi> wrote:
> On Thu, Feb 24, 2011 at 02:46:17PM -0800, Dmitry Shmidt wrote:
>> This is wireless_copy.h update to Version 22 as well as minor fix for Android
>
>> diff --git a/src/drivers/wireless_copy.h b/src/drivers/wireless_copy.h
>
>> - /* jkm - replaced linux headers with C library headers, added typedefs */
>> -#if 0
>> -/* To minimise problems in user space, I might remove those headers
>> - * at some point. Jean II */
>> +#ifdef ANDROID
>> ?#include <linux/types.h> ? ? ? ? ? ? /* for "caddr_t" et al ? ? ? ? ?*/
>> ?#include <linux/socket.h> ? ? ? ? ? ?/* for "struct sockaddr" et al ?*/
>> ?#include <linux/if.h> ? ? ? ? ? ? ? ? ? ? ? ?/* for IFNAMSIZ and co... */
>
> Is there any particular reason to include these kernel header files here
> for Android build? The old build problem I had in a test with
> Android-x86 was that the __u32 and friends were already defined in
> bionic/libc/kernel/arch-x86/asm/types.h. I used following patch to work
> around this:
>
>
> diff --git a/src/drivers/wireless_copy.h b/src/drivers/wireless_copy.h
> index 9d5ca3b..201719b 100644
> --- a/src/drivers/wireless_copy.h
> +++ b/src/drivers/wireless_copy.h
> @@ -84,11 +84,13 @@
> ?#else
> ?#include <sys/types.h>
> ?#include <net/if.h>
> +#ifndef ANDROID
> ?typedef __uint32_t __u32;
> ?typedef __int32_t __s32;
> ?typedef __uint16_t __u16;
> ?typedef __int16_t __s16;
> ?typedef __uint8_t __u8;
> +#endif /* ANDROID */
> ?#ifndef __user
> ?#define __user
> ?#endif /* __user */
>
> --
> Jouni Malinen ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>

Yes, this solution is acceptable as well.
Thanks,

Dmitry



More information about the Hostap mailing list