diff options
author | Kevin Ryde <user42@zip.com.au> | 2004-08-27 01:06:50 +0000 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2004-08-27 01:06:50 +0000 |
commit | 93b047f413279a6fff2d03187f6f192024e3ba31 (patch) | |
tree | b7ed315c613ba7e924c0cfb00a115f9c4f1e0bdd | |
parent | e58fdf43e65dede5f8284ad462de356cc8536aaf (diff) | |
download | guile-93b047f413279a6fff2d03187f6f192024e3ba31.tar.gz |
(scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
-rw-r--r-- | libguile/socket.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libguile/socket.c b/libguile/socket.c index a092962b1..cab3b6512 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -734,9 +734,7 @@ scm_fill_sockaddr (int fam, SCM address, SCM *args, int which_arg, soka = (struct sockaddr_in *) scm_malloc (sizeof (struct sockaddr_in)); if (!soka) scm_memory_error (proc); - /* 4.4BSD-style interface includes sin_len member and defines SIN_LEN, - 4.3BSD does not. */ -#ifdef SIN_LEN +#if HAVE_STRUCT_SOCKADDR_SIN_LEN soka->sin_len = sizeof (struct sockaddr_in); #endif soka->sin_family = AF_INET; @@ -771,7 +769,7 @@ scm_fill_sockaddr (int fam, SCM address, SCM *args, int which_arg, soka = (struct sockaddr_in6 *) scm_malloc (sizeof (struct sockaddr_in6)); if (!soka) scm_memory_error (proc); -#ifdef SIN_LEN6 +#if HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN soka->sin6_len = sizeof (struct sockaddr_in6); #endif soka->sin6_family = AF_INET6; |