Cumulative patch from commit d0df64373561a8804c35e1900e5857096f5b73d8

d0df643 wpa_supplicant: Call frequency conflict handling during auth
0cf24fd scan: Reset normal scan counter when a connection succeeds
dcdce14 radiotap: Fix compilation for systems without le16toh/le32toh
9176ec0 Android: Disable unused parameter warnings
2aa82e5 Interworking: Don't filter probe requests when interworking is disabled
13f6a07 Add SIM identifier to the network profile and cred block

Change-Id: I9135d23aea91ca2950b5eeefa9f81c38ab1ff4d1
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/src/utils/platform.h b/src/utils/platform.h
index 9ab734b..46cfe78 100644
--- a/src/utils/platform.h
+++ b/src/utils/platform.h
@@ -1,12 +1,12 @@
-#include <stddef.h>
-#include <errno.h>
-#ifndef _BSD_SOURCE
-#define _BSD_SOURCE
-#endif
-#include <endian.h>
+#ifndef PLATFORM_H
+#define PLATFORM_H
 
-#define le16_to_cpu		le16toh
-#define le32_to_cpu		le32toh
+#include "includes.h"
+#include "common.h"
+
+#define le16_to_cpu		le_to_host16
+#define le32_to_cpu		le_to_host32
+
 #define get_unaligned(p)					\
 ({								\
 	struct packed_dummy_struct {				\
@@ -17,3 +17,5 @@
 })
 #define get_unaligned_le16(p)	le16_to_cpu(get_unaligned((uint16_t *)(p)))
 #define get_unaligned_le32(p)	le32_to_cpu(get_unaligned((uint32_t *)(p)))
+
+#endif /* PLATFORM_H */