#ifdef AROS
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdring.h>
#include <sys/types.h>
#include <sys/time.h>
#include "aros_compat.h"
return 2;
}
+struct Library * SocketBase = NULL;
+
+void aros_init_socket(void)
+{
+ if (!(SocketBase = OpenLibrary("bsdsocket.library", 4))) {
+ printf("No TCP/IP stack available.\n");
+ exit(10);
+ }
+}
+
int aros_poll(struct pollfd *fds, unsigned int nfds, int timo)
{
struct timeval timeout, *toptr;
timeout.tv_usec = (timo - timeout.tv_sec * 1000) * 1000;
}
- rc = select(0, ip, op, &efds, toptr);
+ rc = WaitSelect(0, ip, op, &efds, toptr, NULL);
if(rc <= 0)
return rc;
#include <netinet/in.h>
#include <sys/mount.h>
#include <proto/socket.h>
+#include <proto/exec.h>
#define statvfs statfs
+#define ioctl IoctlSocket
+#define close CloseSocket
+
+extern struct Library * SocketBase;
+
+void aros_init_socket(void);
#define f_flag f_flags
#define f_favail f_ffree
#include "libnfs-zdr.h"
#include "libnfs.h"
+#ifdef AROS
+#include "aros_compat.h"
+#endif
int main(int argc _U_, char *argv[] _U_)
{
struct nfs_server_list *srvrs;
struct nfs_server_list *srv;
+#ifdef AROS
+ aros_init_socket();
+#endif
+
srvrs = nfs_find_local_servers();
for (srv=srvrs; srv; srv = srv->next) {
printf("NFS SERVER @ %s\n", srv->addr);
#include "libnfs-raw.h"
#include "libnfs-private.h"
+#ifdef AROS
+#include "aros_compat.h"
+#endif
+
struct rpc_context *rpc_init_context(void)
{
struct rpc_context *rpc;