mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
radiotap: Fix compilation for systems without le16toh/le32toh
These functions are not standard and do not exist in all systems, e.g., variants of Android. Instead use the macros defined in common.h. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
9176ec066e
commit
dcdce14741
@ -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
|
||||
|
||||
#include "includes.h"
|
||||
#include "common.h"
|
||||
|
||||
#define le16_to_cpu le_to_host16
|
||||
#define le32_to_cpu le_to_host32
|
||||
|
||||
#define le16_to_cpu le16toh
|
||||
#define le32_to_cpu le32toh
|
||||
#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 */
|
||||
|
Loading…
Reference in New Issue
Block a user