X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=aros%2Faros_compat.c;h=c7ff5b34fcb7e68e28a83bfbe66c7673191b650b;hb=f95e1d1108ddb4f40a173139b492bf064d34c4ba;hp=6e484f4cad79ab6935b8ec9986667e290a72ce88;hpb=e267bb128cbd5956ba4a471dadf294b118a7e51d;p=deb_libnfs.git diff --git a/aros/aros_compat.c b/aros/aros_compat.c index 6e484f4..c7ff5b3 100644 --- a/aros/aros_compat.c +++ b/aros/aros_compat.c @@ -9,6 +9,8 @@ #include #include #include "aros_compat.h" +#include +#include #undef poll @@ -77,12 +79,23 @@ int minor(int i) 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); } + 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)