[PATCH] Compile fixes - undefined u64, s32
Pavel Roskin
proski
Fri Apr 11 13:21:10 PDT 2003
Hello!
I cannot compile prism2_srec and hostap_crypt_conf because they don't
understand u64 and s32 in driver/modules/hostap_wlan.h:
cc -O2 -Wall -c -o prism2_srec.o prism2_srec.c
In file included from util.h:8,
from prism2_srec.c:23:
../driver/modules/hostap_wlan.h:55: parse error before "u64"
hostapd/common.h should define them and utils/hostap_crypt_conf.c should
use that header instead of its own definitions.
__extension__ means that gcc shouldn't complain about non-portable "long
long" even in the strict ANSI mode. glibc uses it, so it's better to use
a compatible definition.
The patch is attached.
--
Regards,
Pavel Roskin
-------------- next part --------------
--- hostapd/common.h
+++ hostapd/common.h
@@ -16,10 +16,16 @@
#endif
+__extension__ typedef unsigned long long int u64;
typedef unsigned int u32;
typedef unsigned short u16;
typedef unsigned char u8;
+__extension__ typedef signed long long int s64;
+typedef __int32_t s32;
+typedef __int16_t s16;
+typedef __int8_t s8;
+
int hostapd_get_rand(u8 *buf, size_t len);
void hostapd_hexdump(const char *title, u8 *buf, size_t len);
int hwaddr_aton(char *txt, u8 *addr);
--- utils/hostap_crypt_conf.c
+++ utils/hostap_crypt_conf.c
@@ -19,12 +19,9 @@
#include <dirent.h>
#include <sys/socket.h>
+#include "../hostapd/common.h"
#include "wireless_copy.h"
-typedef unsigned int u32;
-typedef unsigned short u16;
-typedef unsigned char u8;
-
#define DEFAULT_KEYS "ff:ff:ff:ff:ff:ff"
#ifndef ETH_ALEN
More information about the Hostap
mailing list