forked from zeoneo/rpi-3b-wifi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
os_rpi3b.h
executable file
·80 lines (57 loc) · 1.45 KB
/
os_rpi3b.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* OS specific functions
* Copyright (c) 2005-2009, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#ifndef _os_rpi3b_h
#define _os_rpi3b_h
#ifdef __cplusplus
extern "C" {
#endif
#include <mem/kernel_alloc.h>
#include <plibc/string.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
typedef struct {
int x;
} FILE;
struct in_addr {
int x;
};
typedef signed long time_t;
typedef unsigned int size_t;
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;
#include "os.h"
#define __LITTLE_ENDIAN 1234
#define __BYTE_ORDER __LITTLE_ENDIAN
#define WPA_TYPES_DEFINED
#define __force
#define bswap_16 bswap16
#define bswap_32 bswap32
int abs(int i);
int isprint(int c);
char* strrchr(const char* s, int c);
char* strdup(const char* s);
int snprintf(char* str, size_t size, const char* format, ...);
int vsnprintf(char* str, size_t size, const char* format, va_list ap);
int printf(const char* format, ...);
int vprintf(const char* format, va_list ap);
void qsort(void* base, size_t nmemb, size_t size, int (*compare)(const void*, const void*));
void abort(void);
void os_hexdump(const char* title, const void* p, size_t len);
// #define os_daemonize(s) (0)
// #define os_daemonize_terminate(s) ((void) 0)
#ifdef __cplusplus
}
#endif
#endif