From ce02e5e09eb50ed9a67a3067a001092b73c0d514 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 14 Jul 2008 12:02:24 +1000 Subject: [PATCH] - (djm) [openbsd-compat/bindresvport.c] Rename variables s/sin/in/ to avoid clash with sin(3) function; reported by cristian.ionescu-idbohrn AT axis.com --- ChangeLog | 5 ++++- openbsd-compat/bindresvport.c | 12 ++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index caefabaf5..131b1df3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,9 @@ increase number of piplelined requests so they properly fill the (recently increased) channel window. prompted by rapier AT psc.edu; ok markus@ + - (djm) [openbsd-compat/bindresvport.c] Rename variables s/sin/in/ to + avoid clash with sin(3) function; reported by + cristian.ionescu-idbohrn AT axis.com 20080712 - (djm) OpenBSD CVS Sync @@ -4651,4 +4654,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.5078 2008/07/14 01:29:24 djm Exp $ +$Id: ChangeLog,v 1.5079 2008/07/14 02:02:24 djm Exp $ diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c index 08a53b8cd..c0d5bdb5c 100644 --- a/openbsd-compat/bindresvport.c +++ b/openbsd-compat/bindresvport.c @@ -54,8 +54,8 @@ bindresvport_sa(int sd, struct sockaddr *sa) { int error, af; struct sockaddr_storage myaddr; - struct sockaddr_in *sin; - struct sockaddr_in6 *sin6; + struct sockaddr_in *in; + struct sockaddr_in6 *in6; u_int16_t *portp; u_int16_t port; socklen_t salen; @@ -74,13 +74,13 @@ bindresvport_sa(int sd, struct sockaddr *sa) af = sa->sa_family; if (af == AF_INET) { - sin = (struct sockaddr_in *)sa; + in = (struct sockaddr_in *)sa; salen = sizeof(struct sockaddr_in); - portp = &sin->sin_port; + portp = &in->sin_port; } else if (af == AF_INET6) { - sin6 = (struct sockaddr_in6 *)sa; + in6 = (struct sockaddr_in6 *)sa; salen = sizeof(struct sockaddr_in6); - portp = &sin6->sin6_port; + portp = &in6->sin6_port; } else { errno = EPFNOSUPPORT; return (-1);