repositories
/
deb_libnfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AROS: it is called IoctlSocket/CloseSocket and WaitSelect on AROS.
[deb_libnfs.git]
/
aros
/
aros_compat.c
diff --git
a/aros/aros_compat.c
b/aros/aros_compat.c
index 7f46a469ed67185d8d1ad20a2a7aebe77fefb1aa..202f614779514feb7b172f3031ade07ffcfa9609 100644
(file)
--- a/
aros/aros_compat.c
+++ b/
aros/aros_compat.c
@@
-17,6
+17,9
@@
#ifdef AROS
#ifdef AROS
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdring.h>
#include <sys/types.h>
#include <sys/time.h>
#include "aros_compat.h"
#include <sys/types.h>
#include <sys/time.h>
#include "aros_compat.h"
@@
-33,6
+36,16
@@
int minor(int i)
return 2;
}
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;
int aros_poll(struct pollfd *fds, unsigned int nfds, int timo)
{
struct timeval timeout, *toptr;
@@
-72,7
+85,7
@@
int aros_poll(struct pollfd *fds, unsigned int nfds, int timo)
timeout.tv_usec = (timo - timeout.tv_sec * 1000) * 1000;
}
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;
if(rc <= 0)
return rc;