diff options
author | bigbiff bigbiff <bigbiff@teamw.in> | 2013-01-09 15:09:08 +0100 |
---|---|---|
committer | bigbiff bigbiff <bigbiff@teamw.in> | 2013-01-09 15:09:08 +0100 |
commit | 9c754053b07a724bdd98d039f34899d6a49115b7 (patch) | |
tree | 464885db361a12d83d60cf152142c765562bb92d /libtar/inet_aton.c | |
parent | Add Samsung TouchWiz decryption (diff) | |
download | android_bootable_recovery-9c754053b07a724bdd98d039f34899d6a49115b7.tar android_bootable_recovery-9c754053b07a724bdd98d039f34899d6a49115b7.tar.gz android_bootable_recovery-9c754053b07a724bdd98d039f34899d6a49115b7.tar.bz2 android_bootable_recovery-9c754053b07a724bdd98d039f34899d6a49115b7.tar.lz android_bootable_recovery-9c754053b07a724bdd98d039f34899d6a49115b7.tar.xz android_bootable_recovery-9c754053b07a724bdd98d039f34899d6a49115b7.tar.zst android_bootable_recovery-9c754053b07a724bdd98d039f34899d6a49115b7.zip |
Diffstat (limited to 'libtar/inet_aton.c')
-rw-r--r-- | libtar/inet_aton.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libtar/inet_aton.c b/libtar/inet_aton.c new file mode 100644 index 000000000..a935d5a6b --- /dev/null +++ b/libtar/inet_aton.c @@ -0,0 +1,27 @@ +/* +** Copyright 2002 University of Illinois Board of Trustees +** Copyright 2002 Mark D. Roth +** All rights reserved. +** +** inet_aton.c - inet_aton() function for compatibility library +** +** Mark D. Roth <roth@uiuc.edu> +** Campus Information Technologies and Educational Services +** University of Illinois at Urbana-Champaign +*/ + +#include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> + + +int +inet_aton(const char *cp, struct in_addr *inp) +{ + inp->s_addr = inet_addr(cp); + if (inp->s_addr == -1) + return 0; + return 1; +} + + |