mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
* socket.c: add a definition of SUN_LEN (from glibc) for when it's
not already defined.
This commit is contained in:
parent
7d4351201f
commit
97d0e20b2e
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2001-03-10 Gary Houston <ghouston@arglist.com>
|
||||||
|
|
||||||
|
* socket.c: add a definition of SUN_LEN (from glibc) for when it's
|
||||||
|
not already defined.
|
||||||
|
|
||||||
2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
|
2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
|
||||||
|
|
||||||
* coop.c: Inserted #include <stdio.h>.
|
* coop.c: Inserted #include <stdio.h>.
|
||||||
|
|
|
@ -69,6 +69,11 @@
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
#if defined (HAVE_UNIX_DOMAIN_SOCKETS) && !defined (SUN_LEN)
|
||||||
|
#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
|
||||||
|
+ strlen ((ptr)->sun_path))
|
||||||
|
#endif
|
||||||
|
|
||||||
/* we are not currently using socklen_t. it's not defined on all systems,
|
/* we are not currently using socklen_t. it's not defined on all systems,
|
||||||
so would need to be checked by configure. in the meantime, plain
|
so would need to be checked by configure. in the meantime, plain
|
||||||
int is the best alternative. */
|
int is the best alternative. */
|
||||||
|
@ -810,9 +815,8 @@ SCM_DEFINE (scm_recvfrom, "recvfrom!", 2, 3, 0,
|
||||||
else
|
else
|
||||||
SCM_VALIDATE_ULONG_COPY (3, flags, flg);
|
SCM_VALIDATE_ULONG_COPY (3, flags, flg);
|
||||||
|
|
||||||
/* recvfrom will not necessarily return an address. e.g., linux
|
/* recvfrom will not necessarily return an address. usually nothing
|
||||||
2.4.2 doesn't change addr or addr_size if socket is
|
is returned for stream sockets. */
|
||||||
AF_INET/SOCK_STREAM. */
|
|
||||||
addr->sa_family = AF_UNSPEC;
|
addr->sa_family = AF_UNSPEC;
|
||||||
SCM_SYSCALL (rv = recvfrom (fd, buf + offset,
|
SCM_SYSCALL (rv = recvfrom (fd, buf + offset,
|
||||||
cend - offset, flg,
|
cend - offset, flg,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue