AROS: We need emulation of readv/writev on aros

This commit is contained in:
Ronnie Sahlberg
2013-04-22 18:50:05 -07:00
parent 322be0cf24
commit 0a026e2da7
3 changed files with 15 additions and 0 deletions

View File

@@ -167,3 +167,12 @@ int aros_poll(struct pollfd *fds, unsigned int nfds, int timo)
return rc;
}
ssize_t aros_readv(int fd, const struct iovec *iov, int iovcnt)
{
return read(fd, iov[0].iov_base, iov[0].iov_len);
}
ssize_t aros_writev(int fd, const struct iovec *iov, int iovcnt)
{
return write(fd, iov[0].iov_base, iov[0].iov_len);
}

View File

@@ -14,6 +14,8 @@
#define ioctl IoctlSocket
#define close CloseSocket
#define writev aros_writev
#define readv aros_readv
#define inet_pton aros_inet_pton
#define freeaddrinfo aros_freeaddrinfo
#define getnameinfo aros_getnameinfo

View File

@@ -26,6 +26,10 @@
#include <unistd.h>
#endif
#ifdef AROS
#include "aros/aros_compat.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>