Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More notes
[rsync/rsync.git]
/
lib
/
inet_pton.c
diff --git
a/lib/inet_pton.c
b/lib/inet_pton.c
index
6fe8020
..
4034fe1
100644
(file)
--- a/
lib/inet_pton.c
+++ b/
lib/inet_pton.c
@@
-15,15
+15,7
@@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <config.h>
-
-#include <errno.h>
-#include <string.h>
+#include "rsync.h"
#define NS_INT16SZ 2
#define NS_INADDRSZ 4
#define NS_INT16SZ 2
#define NS_INADDRSZ 4
@@
-49,16
+41,17
@@
static int inet_pton6(const char *src, unsigned char *dst);
* Paul Vixie, 1996.
*/
int
* Paul Vixie, 1996.
*/
int
-isc_net_pton(af, src, dst)
- int af;
- const char *src;
- void *dst;
+inet_pton(int af,
+ const char *src,
+ void *dst)
{
switch (af) {
case AF_INET:
return (inet_pton4(src, dst));
{
switch (af) {
case AF_INET:
return (inet_pton4(src, dst));
+#ifdef INET6
case AF_INET6:
return (inet_pton6(src, dst));
case AF_INET6:
return (inet_pton6(src, dst));
+#endif
default:
errno = EAFNOSUPPORT;
return (-1);
default:
errno = EAFNOSUPPORT;
return (-1);
@@
-129,6
+122,7
@@
inet_pton4(src, dst)
* author:
* Paul Vixie, 1996.
*/
* author:
* Paul Vixie, 1996.
*/
+#ifdef INET6
static int
inet_pton6(src, dst)
const char *src;
static int
inet_pton6(src, dst)
const char *src;
@@
-213,3
+207,4
@@
inet_pton6(src, dst)
memcpy(dst, tmp, NS_IN6ADDRSZ);
return (1);
}
memcpy(dst, tmp, NS_IN6ADDRSZ);
return (1);
}
+#endif