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