X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=aros%2Faros_compat.c;h=9b745e53a551bfa37d7f296a42d1391cedbcd134;hb=HEAD;hp=c7ff5b34fcb7e68e28a83bfbe66c7673191b650b;hpb=f95e1d1108ddb4f40a173139b492bf064d34c4ba;p=deb_libnfs.git diff --git a/aros/aros_compat.c b/aros/aros_compat.c index c7ff5b3..9b745e5 100644 --- a/aros/aros_compat.c +++ b/aros/aros_compat.c @@ -1,5 +1,19 @@ +/* + Copyright (C) 2013 by Ronnie Sahlberg -#ifdef AROS + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, see . +*/ #include #include @@ -62,8 +76,11 @@ void aros_freeaddrinfo(struct addrinfo *res) int aros_inet_pton(int af, char *src, void *dst) { - printf("No inet_pton yet"); - exit(10); + struct sockaddr_in sin; + + sin.sin_addr.s_addr = inet_addr(src); + memcpy(dst, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr)); + return 1; } @@ -161,5 +178,3 @@ int aros_poll(struct pollfd *fds, unsigned int nfds, int timo) return rc; } -#endif -