Commit | Line | Data |
---|---|---|
d7c6e9aa RS |
1 | #ifndef AROS_COMPAT_H |
2 | #define AROS_COMPAT_H | |
3 | ||
00748f36 RS |
4 | #include <unistd.h> |
5 | #include <sys/types.h> | |
6 | #include <sys/ioctl.h> | |
d7c6e9aa RS |
7 | #include <netinet/in.h> |
8 | #include <sys/mount.h> | |
e77d093c | 9 | #include <proto/socket.h> |
2cdf4fcb | 10 | #include <proto/exec.h> |
26527603 RS |
11 | #include <netdb.h> |
12 | #include <net/if.h> | |
0556ee05 | 13 | #include <netinet/in.h> |
d7c6e9aa RS |
14 | |
15 | #define statvfs statfs | |
2cdf4fcb RS |
16 | #define ioctl IoctlSocket |
17 | #define close CloseSocket | |
18 | ||
f69bd554 RS |
19 | #define inet_pton aros_inet_pton |
20 | #define freeaddrinfo aros_freeaddrinfo | |
21 | #define getnameinfo aros_getnameinfo | |
22 | #define getaddrinfo aros_getaddrinfo | |
23 | ||
2cdf4fcb RS |
24 | extern struct Library * SocketBase; |
25 | ||
26 | void aros_init_socket(void); | |
d7c6e9aa RS |
27 | |
28 | #define f_flag f_flags | |
29 | #define f_favail f_ffree | |
30 | /* we dont have these at all */ | |
31 | #define f_fsid f_spare[0] | |
32 | #define f_frsize f_spare[0] | |
33 | #define f_namemax f_spare[0] | |
34 | ||
35 | #define POLLIN 0x0001 /* There is data to read */ | |
36 | #define POLLPRI 0x0002 /* There is urgent data to read */ | |
37 | #define POLLOUT 0x0004 /* Writing now will not block */ | |
38 | #define POLLERR 0x0008 /* Error condition */ | |
39 | #define POLLHUP 0x0010 /* Hung up */ | |
40 | #define POLLNVAL 0x0020 /* Invalid request: fd not open */ | |
41 | ||
0556ee05 RS |
42 | struct utimbuf { |
43 | int actime; | |
44 | int modtime; | |
45 | }; | |
46 | ||
d7c6e9aa RS |
47 | struct pollfd { |
48 | int fd; /* file descriptor */ | |
49 | short events; /* requested events */ | |
50 | short revents; /* returned events */ | |
51 | }; | |
52 | ||
53 | #define poll(x, y, z) aros_poll(x, y, z) | |
54 | ||
55 | #endif |