From: Ben Pfaff Date: Wed, 4 May 2011 22:46:27 +0000 (-0700) Subject: stream-ssl: Fix call to accept(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5530655f33f066150294fb12e7a73992edd4188;p=openvswitch stream-ssl: Fix call to accept(). GCC and glibc conspire to allow struct sockaddr_in * to be passed in place of struct sockaddr *, but that's non-standard and we're better off not taking advantage of it. Found by sparse. --- diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c index 977c5ba6..02ce7f56 100644 --- a/lib/stream-ssl.c +++ b/lib/stream-ssl.c @@ -919,7 +919,7 @@ pssl_accept(struct pstream *pstream, struct stream **new_streamp) int new_fd; int error; - new_fd = accept(pssl->fd, &sin, &sin_len); + new_fd = accept(pssl->fd, (struct sockaddr *) &sin, &sin_len); if (new_fd < 0) { error = errno; if (error != EAGAIN) {