#include <sys/socket.h>
#include <netinet/in.h>
-/*
- * Bind a socket to a privileged IP port
- */
-int
-bindresvport(sd, sin)
- int sd;
- struct sockaddr_in *sin;
-{
- return bindresvport_sa(sd, (struct sockaddr *)sin);
-}
-
/*
* Bind a socket to a privileged port for whatever protocol.
*/
struct sockaddr_in6 *sin6;
int proto, portrange, portlow;
u_int16_t port;
- int salen;
+ u_int32_t salen;
if (sa == NULL) {
salen = sizeof(myaddr);
sa->sa_len = salen;
if (port == 0) {
- int oldlen = sizeof(old);
+ u_int32_t oldlen = sizeof(old);
error = getsockopt(sd, proto, portrange, &old, &oldlen);
if (error < 0)
}
return (error);
}
+
+/*
+ * Bind a socket to a privileged IP port
+ */
+int
+bindresvport(sd, sin)
+ int sd;
+ struct sockaddr_in *sin;
+{
+ return bindresvport_sa(sd, (struct sockaddr *)sin);
+}