summaryrefslogtreecommitdiff
path: root/libc/inet/rpc/bindresvport.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
commitaf0172162f7c653cad6a11ed1c1a5459bc154465 (patch)
tree70031dad1e7286d58762da7b9e3d3f93d043c278 /libc/inet/rpc/bindresvport.c
parentc8609543a9a8bf6559c2931dbbef6b3c41b3fbf2 (diff)
hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed
Diffstat (limited to 'libc/inet/rpc/bindresvport.c')
-rw-r--r--libc/inet/rpc/bindresvport.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/libc/inet/rpc/bindresvport.c b/libc/inet/rpc/bindresvport.c
index 530df52b3..68b44d26a 100644
--- a/libc/inet/rpc/bindresvport.c
+++ b/libc/inet/rpc/bindresvport.c
@@ -30,8 +30,6 @@
* Copyright (c) 1987 by Sun Microsystems, Inc.
*/
-#define bind __bind
-
#define __FORCE_GLIBC
#include <features.h>
@@ -42,11 +40,15 @@
#include <sys/socket.h>
#include <netinet/in.h>
+libc_hidden_proto(memset)
+libc_hidden_proto(bind)
+libc_hidden_proto(getpid)
+
/*
* Bind a socket to a privileged IP port
*/
-int attribute_hidden
-__bindresvport (int sd, struct sockaddr_in *sin)
+int
+bindresvport (int sd, struct sockaddr_in *sin)
{
int res;
static short port;
@@ -60,7 +62,7 @@ __bindresvport (int sd, struct sockaddr_in *sin)
if (sin == (struct sockaddr_in *) 0)
{
sin = &myaddr;
- __memset (sin, 0, sizeof (*sin));
+ memset (sin, 0, sizeof (*sin));
sin->sin_family = AF_INET;
}
else if (sin->sin_family != AF_INET)
@@ -71,7 +73,7 @@ __bindresvport (int sd, struct sockaddr_in *sin)
if (port == 0)
{
- port = (__getpid () % NPORTS) + STARTPORT;
+ port = (getpid () % NPORTS) + STARTPORT;
}
res = -1;
__set_errno (EADDRINUSE);
@@ -88,4 +90,5 @@ __bindresvport (int sd, struct sockaddr_in *sin)
return res;
}
-strong_alias(__bindresvport,bindresvport)
+libc_hidden_proto(bindresvport)
+libc_hidden_def(bindresvport)