summaryrefslogtreecommitdiff
path: root/libc/inet
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet')
-rw-r--r--libc/inet/ntohl.c21
-rw-r--r--libc/inet/opensock.c3
-rw-r--r--libc/inet/resolv.c12
-rw-r--r--libc/inet/rpc/create_xid.c3
-rw-r--r--libc/inet/rpc/rcmd.c3
-rw-r--r--libc/inet/rpc/sa_len.c3
-rw-r--r--libc/inet/rpc/svc_authux.c6
-rw-r--r--libc/inet/rpc/svc_simple.c2
-rw-r--r--libc/inet/rpc/svc_tcp.c2
-rw-r--r--libc/inet/rpc/svc_udp.c1
-rw-r--r--libc/inet/rpc/svc_unix.c2
-rw-r--r--libc/inet/socketcalls.c8
12 files changed, 51 insertions, 15 deletions
diff --git a/libc/inet/ntohl.c b/libc/inet/ntohl.c
index 4fbdf7096..87a034bf0 100644
--- a/libc/inet/ntohl.c
+++ b/libc/inet/ntohl.c
@@ -22,43 +22,48 @@
#include <endian.h>
#include <byteswap.h>
+uint32_t ntohl (uint32_t x);
+uint16_t ntohs (uint16_t x);
+uint32_t htonl (uint32_t x);
+uint16_t htons (uint16_t x);
+
#if __BYTE_ORDER == __BIG_ENDIAN
-extern uint32_t ntohl (uint32_t x)
+uint32_t ntohl (uint32_t x)
{
return x;
}
-extern uint16_t ntohs (uint16_t x)
+uint16_t ntohs (uint16_t x)
{
return x;
}
-extern uint32_t htonl (uint32_t x)
+uint32_t htonl (uint32_t x)
{
return x;
}
-extern uint16_t htons (uint16_t x)
+uint16_t htons (uint16_t x)
{
return x;
}
#elif __BYTE_ORDER == __LITTLE_ENDIAN
-extern uint32_t ntohl (uint32_t x)
+uint32_t ntohl (uint32_t x)
{
return __bswap_32(x);
}
-extern uint16_t ntohs (uint16_t x)
+uint16_t ntohs (uint16_t x)
{
return __bswap_16(x);
}
-extern uint32_t htonl (uint32_t x)
+uint32_t htonl (uint32_t x)
{
return __bswap_32(x);
}
-extern uint16_t htons (uint16_t x)
+uint16_t htons (uint16_t x)
{
return __bswap_16(x);
}
diff --git a/libc/inet/opensock.c b/libc/inet/opensock.c
index 4db86bd7b..a2c09dcf5 100644
--- a/libc/inet/opensock.c
+++ b/libc/inet/opensock.c
@@ -29,7 +29,8 @@ libc_hidden_proto(socket)
/* Return a socket of any type. The socket can be used in subsequent
ioctl calls to talk to the kernel. */
-int attribute_hidden
+int __opensock(void) attribute_hidden;
+int
__opensock (void)
{
int fd;
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index 0b479ee20..885413db8 100644
--- a/libc/inet/resolv.c
+++ b/libc/inet/resolv.c
@@ -600,7 +600,13 @@ int attribute_hidden __decode_answer(unsigned char *message, int offset,
#endif
#ifdef L_encodep
-int attribute_hidden __encode_packet(struct resolv_header *h,
+int __encode_packet(struct resolv_header *h,
+ struct resolv_question **q,
+ struct resolv_answer **an,
+ struct resolv_answer **ns,
+ struct resolv_answer **ar,
+ unsigned char *dest, int maxlen) attribute_hidden;
+int __encode_packet(struct resolv_header *h,
struct resolv_question **q,
struct resolv_answer **an,
struct resolv_answer **ns,
@@ -657,13 +663,15 @@ int attribute_hidden __encode_packet(struct resolv_header *h,
#endif
#ifdef L_decodep
-int attribute_hidden __decode_packet(unsigned char *data, struct resolv_header *h)
+int __decode_packet(unsigned char *data, struct resolv_header *h) attribute_hidden;
+int __decode_packet(unsigned char *data, struct resolv_header *h)
{
return __decode_header(data, h);
}
#endif
#ifdef L_formquery
+int __form_query(int id, const char *name, int type, unsigned char *packet, int maxlen);
int __form_query(int id, const char *name, int type, unsigned char *packet,
int maxlen)
{
diff --git a/libc/inet/rpc/create_xid.c b/libc/inet/rpc/create_xid.c
index 3527eef17..3b90d7a48 100644
--- a/libc/inet/rpc/create_xid.c
+++ b/libc/inet/rpc/create_xid.c
@@ -41,7 +41,8 @@ static pthread_mutex_t createxid_lock = PTHREAD_MUTEX_INITIALIZER;
static int is_initialized;
static struct drand48_data __rpc_lrand48_data;
-u_long attribute_hidden _create_xid (void)
+u_long _create_xid (void) attribute_hidden;
+u_long _create_xid (void)
{
unsigned long res;
diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c
index 1bd511d26..6fcb01738 100644
--- a/libc/inet/rpc/rcmd.c
+++ b/libc/inet/rpc/rcmd.c
@@ -532,6 +532,7 @@ iruserok2 (raddr, superuser, ruser, luser, rhost)
}
/* This is the exported version. */
+int iruserok (u_int32_t raddr, int superuser, const char * ruser, const char * luser);
int iruserok (u_int32_t raddr, int superuser, const char * ruser, const char * luser)
{
return iruserok2 (raddr, superuser, ruser, luser, "-");
@@ -550,6 +551,8 @@ int iruserok (u_int32_t raddr, int superuser, const char * ruser, const char * l
* Returns 0 if ok, -1 if not ok.
*/
int
+__ivaliduser(FILE *hostf, u_int32_t raddr, const char *luser, const char *ruser);
+int
__ivaliduser(FILE *hostf, u_int32_t raddr, const char *luser, const char *ruser)
{
return __ivaliduser2(hostf, raddr, luser, ruser, "-");
diff --git a/libc/inet/rpc/sa_len.c b/libc/inet/rpc/sa_len.c
index 21a6417af..3b37eba44 100644
--- a/libc/inet/rpc/sa_len.c
+++ b/libc/inet/rpc/sa_len.c
@@ -31,7 +31,8 @@
#include <netrose/rose.h>
#endif
-int attribute_hidden __libc_sa_len (sa_family_t af)
+int __libc_sa_len (sa_family_t af) attribute_hidden;
+int __libc_sa_len (sa_family_t af)
{
switch (af)
{
diff --git a/libc/inet/rpc/svc_authux.c b/libc/inet/rpc/svc_authux.c
index 3afcfc5d4..ef8476784 100644
--- a/libc/inet/rpc/svc_authux.c
+++ b/libc/inet/rpc/svc_authux.c
@@ -54,7 +54,8 @@ libc_hidden_proto(xdr_authunix_parms)
/*
* Unix longhand authenticator
*/
-attribute_hidden
+enum auth_stat
+_svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg) attribute_hidden;
enum auth_stat
_svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg)
{
@@ -153,7 +154,8 @@ done:
* Looks up longhand in a cache.
*/
/*ARGSUSED */
-attribute_hidden
+enum auth_stat
+_svcauth_short (struct svc_req *rqst attribute_unused, struct rpc_msg *msg attribute_unused) attribute_hidden;
enum auth_stat
_svcauth_short (struct svc_req *rqst attribute_unused, struct rpc_msg *msg attribute_unused)
{
diff --git a/libc/inet/rpc/svc_simple.c b/libc/inet/rpc/svc_simple.c
index a40f2b7b4..075b930b1 100644
--- a/libc/inet/rpc/svc_simple.c
+++ b/libc/inet/rpc/svc_simple.c
@@ -90,6 +90,8 @@ static void universal (struct svc_req *rqstp, SVCXPRT *transp_s);
static SVCXPRT *transp;
#endif
+int registerrpc (u_long prognum, u_long versnum, u_long procnum,
+ char *(*progname) (char *), xdrproc_t inproc, xdrproc_t outproc);
int
registerrpc (u_long prognum, u_long versnum, u_long procnum,
char *(*progname) (char *), xdrproc_t inproc, xdrproc_t outproc)
diff --git a/libc/inet/rpc/svc_tcp.c b/libc/inet/rpc/svc_tcp.c
index 8f2863f76..c94f2de07 100644
--- a/libc/inet/rpc/svc_tcp.c
+++ b/libc/inet/rpc/svc_tcp.c
@@ -232,6 +232,8 @@ svctcp_create (int sock, u_int sendsize, u_int recvsize)
* descriptor as its first input.
*/
SVCXPRT *
+svcfd_create (int fd, u_int sendsize, u_int recvsize);
+SVCXPRT *
svcfd_create (int fd, u_int sendsize, u_int recvsize)
{
return makefd_xprt (fd, sendsize, recvsize);
diff --git a/libc/inet/rpc/svc_udp.c b/libc/inet/rpc/svc_udp.c
index 4be2782fa..53ef7ab35 100644
--- a/libc/inet/rpc/svc_udp.c
+++ b/libc/inet/rpc/svc_udp.c
@@ -486,6 +486,7 @@ struct udp_cache
* Enable use of the cache.
* Note: there is no disable.
*/
+int svcudp_enablecache (SVCXPRT *transp, u_long size);
int
svcudp_enablecache (SVCXPRT *transp, u_long size)
{
diff --git a/libc/inet/rpc/svc_unix.c b/libc/inet/rpc/svc_unix.c
index 4c538b2f1..d91a9acbb 100644
--- a/libc/inet/rpc/svc_unix.c
+++ b/libc/inet/rpc/svc_unix.c
@@ -231,6 +231,8 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path)
* descriptor as its first input.
*/
SVCXPRT *
+svcunixfd_create (int fd, u_int sendsize, u_int recvsize);
+SVCXPRT *
svcunixfd_create (int fd, u_int sendsize, u_int recvsize)
{
return makefd_xprt (fd, sendsize, recvsize);
diff --git a/libc/inet/socketcalls.c b/libc/inet/socketcalls.c
index d1bfe4b98..01db8c319 100644
--- a/libc/inet/socketcalls.c
+++ b/libc/inet/socketcalls.c
@@ -35,6 +35,7 @@ extern int __socketcall(int call, unsigned long *args) attribute_hidden;
#ifdef L_accept
+extern __typeof(accept) __libc_accept;
#ifdef __NR_accept
#define __NR___libc_accept __NR_accept
_syscall3(int, __libc_accept, int, call, struct sockaddr *, addr, socklen_t *,addrlen);
@@ -73,6 +74,7 @@ libc_hidden_def(bind)
#endif
#ifdef L_connect
+extern __typeof(connect) __libc_connect;
#ifdef __NR_connect
#define __NR___libc_connect __NR_connect
_syscall3(int, __libc_connect, int, sockfd, const struct sockaddr *, saddr, socklen_t, addrlen);
@@ -163,6 +165,7 @@ libc_hidden_def(listen)
#endif
#ifdef L_recv
+extern __typeof(recv) __libc_recv;
#ifdef __NR_recv
#define __NR___libc_recv __NR_recv
_syscall4(ssize_t, __libc_recv, int, sockfd, __ptr_t, buffer, size_t, len, int, flags);
@@ -191,6 +194,7 @@ libc_hidden_def(recv)
#endif
#ifdef L_recvfrom
+extern __typeof(recvfrom) __libc_recvfrom;
#ifdef __NR_recvfrom
#define __NR___libc_recvfrom __NR_recvfrom
_syscall6(ssize_t, __libc_recvfrom, int, sockfd, __ptr_t, buffer, size_t, len, int, flags,
@@ -217,6 +221,7 @@ libc_hidden_def(recvfrom)
#endif
#ifdef L_recvmsg
+extern __typeof(recvmsg) __libc_recvmsg;
#ifdef __NR_recvmsg
#define __NR___libc_recvmsg __NR_recvmsg
_syscall3(ssize_t, __libc_recvmsg, int, sockfd, struct msghdr *, msg, int, flags);
@@ -237,6 +242,7 @@ libc_hidden_def(recvmsg)
#endif
#ifdef L_send
+extern __typeof(send) __libc_send;
#ifdef __NR_send
#define __NR___libc_send __NR_send
_syscall4(ssize_t, __libc_send, int, sockfd, const void *, buffer, size_t, len, int, flags);
@@ -265,6 +271,7 @@ libc_hidden_def(send)
#endif
#ifdef L_sendmsg
+extern __typeof(sendmsg) __libc_sendmsg;
#ifdef __NR_sendmsg
#define __NR___libc_sendmsg __NR_sendmsg
_syscall3(ssize_t, __libc_sendmsg, int, sockfd, const struct msghdr *, msg, int, flags);
@@ -285,6 +292,7 @@ libc_hidden_def(sendmsg)
#endif
#ifdef L_sendto
+extern __typeof(sendto) __libc_sendto;
#ifdef __NR_sendto
#define __NR___libc_sendto __NR_sendto
_syscall6(ssize_t, __libc_sendto, int, sockfd, const void *, buffer, size_t, len,