1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-06 04:56:33 +00:00

some raw IP and UNIX datagram modes failed on BSD systems; test.sh: more stable timing, corrections for BSD

This commit is contained in:
Gerhard Rieger 2008-09-14 18:33:28 +02:00
parent 67e59494c4
commit f8496421f9
7 changed files with 97 additions and 41 deletions

View file

@ -78,6 +78,9 @@ xiosetunix(struct sockaddr_un *saun,
if (tight) {
len = sizeof(struct sockaddr_un)-sizeof(saun->sun_path)+
MIN(pathlen, sizeof(saun->sun_path));
#if HAVE_STRUCT_SOCKADDR_SALEN
saun->sun_len = len;
#endif
} else {
len = sizeof(struct sockaddr_un);
}
@ -91,6 +94,9 @@ xiosetunix(struct sockaddr_un *saun,
if (tight) {
len = sizeof(struct sockaddr_un)-sizeof(saun->sun_path)+
MIN(pathlen+1, sizeof(saun->sun_path));
#if HAVE_STRUCT_SOCKADDR_SALEN
saun->sun_len = len;
#endif
} else {
len = sizeof(struct sockaddr_un);
}