more header include cleanups
[deb_libnfs.git] / aros / aros_compat.h
CommitLineData
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>
d7c6e9aa
RS
11
12#define statvfs statfs
2cdf4fcb
RS
13#define ioctl IoctlSocket
14#define close CloseSocket
15
f69bd554
RS
16#define inet_pton aros_inet_pton
17#define freeaddrinfo aros_freeaddrinfo
18#define getnameinfo aros_getnameinfo
19#define getaddrinfo aros_getaddrinfo
20
2cdf4fcb
RS
21extern struct Library * SocketBase;
22
23void aros_init_socket(void);
d7c6e9aa
RS
24
25#define f_flag f_flags
26#define f_favail f_ffree
27/* we dont have these at all */
28#define f_fsid f_spare[0]
29#define f_frsize f_spare[0]
30#define f_namemax f_spare[0]
31
32#define POLLIN 0x0001 /* There is data to read */
33#define POLLPRI 0x0002 /* There is urgent data to read */
34#define POLLOUT 0x0004 /* Writing now will not block */
35#define POLLERR 0x0008 /* Error condition */
36#define POLLHUP 0x0010 /* Hung up */
37#define POLLNVAL 0x0020 /* Invalid request: fd not open */
38
39struct pollfd {
40 int fd; /* file descriptor */
41 short events; /* requested events */
42 short revents; /* returned events */
43};
44
45#define poll(x, y, z) aros_poll(x, y, z)
46
47#endif