Skip to content

Commit

Permalink
make addr_len the right sign in sslecho
Browse files Browse the repository at this point in the history
cygwin caught a signedness difference in this pointer.

Reviewed-by: Nicola Tuveri <[email protected]>
Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Tom Cosgrove <[email protected]>
(Merged from openssl#24047)
  • Loading branch information
nhorman committed Apr 12, 2024
1 parent 793a405 commit 6195c08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions demos/sslecho/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ int main(int argc, char **argv)
char *rem_server_ip = NULL;

struct sockaddr_in addr;
#if defined(OPENSSL_SYS_CYGWIN) || defined(OPENSSL_SYS_WINDOWS)
int addr_len = sizeof(addr);
#else
unsigned int addr_len = sizeof(addr);
#endif

#if !defined (OPENSSL_SYS_WINDOWS)
/* ignore SIGPIPE so that server can continue running when client pipe closes abruptly */
Expand Down

0 comments on commit 6195c08

Please sign in to comment.