repositories
/
deb_libnfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e267bb1
)
AROS: implement their weird errno handling
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Sat, 13 Apr 2013 11:13:05 +0000
(
04:13
-0700)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Sat, 13 Apr 2013 11:13:05 +0000
(
04:13
-0700)
aros/aros_compat.c
patch
|
blob
|
blame
|
history
diff --git
a/aros/aros_compat.c
b/aros/aros_compat.c
index 6e484f4cad79ab6935b8ec9986667e290a72ce88..c7ff5b34fcb7e68e28a83bfbe66c7673191b650b 100644
(file)
--- a/
aros/aros_compat.c
+++ b/
aros/aros_compat.c
@@
-9,6
+9,8
@@
#include <sys/socket.h>
#include <netdb.h>
#include "aros_compat.h"
#include <sys/socket.h>
#include <netdb.h>
#include "aros_compat.h"
+#include <errno.h>
+#include <bsdsocket/socketbasetags.h>
#undef poll
#undef poll
@@
-77,12
+79,23
@@
int minor(int i)
struct Library * SocketBase = NULL;
struct Library * SocketBase = NULL;
+extern int errno;
+int h_errno = 0;
+
+
void aros_init_socket(void)
{
if (!(SocketBase = OpenLibrary("bsdsocket.library", 4))) {
printf("NoTCP/IP Stack available");
exit(10);
}
void aros_init_socket(void)
{
if (!(SocketBase = OpenLibrary("bsdsocket.library", 4))) {
printf("NoTCP/IP Stack available");
exit(10);
}
+ if (SocketBaseTags(SBTM_SETVAL(SBTC_ERRNOPTR(sizeof(errno))),
+ (IPTR)&errno,
+ SBTM_SETVAL(SBTC_HERRNOLONGPTR),
+ (IPTR)&h_errno, TAG_DONE)) {
+ printf("Failed to set ERRNO");
+ exit(10);
+ }
}
int aros_poll(struct pollfd *fds, unsigned int nfds, int timo)
}
int aros_poll(struct pollfd *fds, unsigned int nfds, int timo)