[PATCH] Compile fixes - undefined u64, s32
Pavel Roskin
proski
Fri Apr 11 13:57:02 PDT 2003
On Fri, 11 Apr 2003, Gerald Britton wrote:
> Why not include <stdint.h> and just use the C99 integer types?
>
> (u)int{8|16|32|64}_t, or typedef the shorter names from these rather
> than redoing it ourselves.
Good idea! Fixed patch is attached.
common.h is never included from the kernel code, so it should be safe to
include stdint.h.
--
Regards,
Pavel Roskin
-------------- next part --------------
--- hostapd/common.h
+++ hostapd/common.h
@@ -16,9 +16,15 @@
#endif
-typedef unsigned int u32;
-typedef unsigned short u16;
-typedef unsigned char u8;
+#include <stdint.h>
+typedef uint64_t u64;
+typedef uint32_t u32;
+typedef uint16_t u16;
+typedef uint8_t u8;
+typedef int64_t 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);
--- 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