diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-30 02:54:42 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-30 02:54:42 +0000 |
| commit | 92ac94812b84cef7d9bddfffd0446721a7a6ee06 (patch) | |
| tree | a5a2c895d613afb96fb71c9c19be9ec266db30d7 /libc/inet | |
| parent | ac02770c4a13eff9fef10c33ebb18d765f25a968 (diff) | |
| download | uClibc-alpine-92ac94812b84cef7d9bddfffd0446721a7a6ee06.tar.bz2 uClibc-alpine-92ac94812b84cef7d9bddfffd0446721a7a6ee06.tar.xz | |
Finalize the merge from the trunk. There are more files to be
merged, but they will be done manually.
Diffstat (limited to 'libc/inet')
| -rw-r--r-- | libc/inet/ntop.c | 2 | ||||
| -rw-r--r-- | libc/inet/socketcalls.c | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/libc/inet/ntop.c b/libc/inet/ntop.c index bcdc57df8..35c302950 100644 --- a/libc/inet/ntop.c +++ b/libc/inet/ntop.c @@ -58,10 +58,12 @@ inet_ntop4(const u_char *src, char *dst, size_t size) i = 0; for (octet = 0; octet <= 3; octet++) { +#if 0 /* since src is unsigned char, it will never be > 255 ... */ if (src[octet] > 255) { __set_errno (ENOSPC); return (NULL); } +#endif tmp[i++] = '0' + src[octet] / 100; if (tmp[i - 1] == '0') { tmp[i - 1] = '0' + (src[octet] / 10 % 10); diff --git a/libc/inet/socketcalls.c b/libc/inet/socketcalls.c index f93d10952..35ab1d7a8 100644 --- a/libc/inet/socketcalls.c +++ b/libc/inet/socketcalls.c @@ -164,6 +164,12 @@ ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags) return (__socketcall(SYS_RECV, args)); } weak_alias(__libc_recv, recv); +#elif defined(__NR_recvfrom) +ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags) +{ + return (recvfrom(sockfd, buffer, len, flags, NULL, NULL)); +} +weak_alias(__libc_recv, recv); #endif #endif @@ -227,6 +233,12 @@ ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags) return (__socketcall(SYS_SEND, args)); } weak_alias(__libc_send, send); +#elif defined(__NR_sendto) +ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags) +{ + return (sendto(sockfd, buffer, len, flags, NULL, 0)); +} +weak_alias(__libc_send, send); #endif #endif |
