[rtems-libbsd commit] Disable or make static kern_* functions
Sebastian Huber
sebh at rtems.org
Thu Nov 15 09:07:34 UTC 2018
Module: rtems-libbsd
Branch: master
Commit: d4bf70e49758a0959eecbfc50ec73afc7531adf5
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=d4bf70e49758a0959eecbfc50ec73afc7531adf5
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Nov 15 10:06:00 2018 +0100
Disable or make static kern_* functions
---
freebsd/sys/kern/kern_event.c | 2 ++
freebsd/sys/kern/kern_uuid.c | 2 +-
freebsd/sys/kern/sys_generic.c | 3 +++
freebsd/sys/kern/sys_pipe.c | 2 ++
freebsd/sys/kern/uipc_syscalls.c | 13 +++++++------
rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h | 9 ---------
6 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/freebsd/sys/kern/kern_event.c b/freebsd/sys/kern/kern_event.c
index 25a9518..2fae2d8 100644
--- a/freebsd/sys/kern/kern_event.c
+++ b/freebsd/sys/kern/kern_event.c
@@ -1388,6 +1388,7 @@ kern_kevent_fp(struct thread *td, struct file *fp, int nchanges, int nevents,
return (error);
}
+#ifndef __rtems__
/*
* Performs a kevent() call on a temporarily created kqueue. This can be
* used to perform one-shot polling, similar to poll() and select().
@@ -1406,6 +1407,7 @@ kern_kevent_anonymous(struct thread *td, int nevents,
kqueue_destroy(&kq);
return (error);
}
+#endif /* __rtems__ */
int
kqueue_add_filteropts(int filt, struct filterops *filtops)
diff --git a/freebsd/sys/kern/kern_uuid.c b/freebsd/sys/kern/kern_uuid.c
index 80290cc..a2316b1 100644
--- a/freebsd/sys/kern/kern_uuid.c
+++ b/freebsd/sys/kern/kern_uuid.c
@@ -130,6 +130,7 @@ uuid_time(void)
return (time & ((1LL << 60) - 1LL));
}
+#ifndef __rtems__
struct uuid *
kern_uuidgen(struct uuid *store, size_t count)
{
@@ -171,7 +172,6 @@ kern_uuidgen(struct uuid *store, size_t count)
return (store);
}
-#ifndef __rtems__
#ifndef _SYS_SYSPROTO_H_
struct uuidgen_args {
struct uuid *store;
diff --git a/freebsd/sys/kern/sys_generic.c b/freebsd/sys/kern/sys_generic.c
index 273cb73..b0da68a 100644
--- a/freebsd/sys/kern/sys_generic.c
+++ b/freebsd/sys/kern/sys_generic.c
@@ -79,6 +79,9 @@ __FBSDID("$FreeBSD$");
#include <security/audit/audit.h>
#ifdef __rtems__
#include <machine/rtems-bsd-syscall-api.h>
+
+static int kern_select(struct thread *, int, fd_set *, fd_set *,
+ fd_set *, struct timeval *, int);
#endif /* __rtems__ */
/*
diff --git a/freebsd/sys/kern/sys_pipe.c b/freebsd/sys/kern/sys_pipe.c
index 8eb0aad..f562b38 100755
--- a/freebsd/sys/kern/sys_pipe.c
+++ b/freebsd/sys/kern/sys_pipe.c
@@ -219,6 +219,8 @@ static const rtems_filesystem_file_handlers_r pipeops = {
long maxpipekva; /* Limit on pipe KVA */
+static int kern_pipe(struct thread *, int [2], int, struct filecaps *,
+ struct filecaps *);
#endif /* __rtems__ */
static void filt_pipedetach(struct knote *kn);
diff --git a/freebsd/sys/kern/uipc_syscalls.c b/freebsd/sys/kern/uipc_syscalls.c
index 9c4c52e..992df71 100644
--- a/freebsd/sys/kern/uipc_syscalls.c
+++ b/freebsd/sys/kern/uipc_syscalls.c
@@ -90,7 +90,13 @@ struct getsockaddr_sockaddr {
char data[SOCK_MAXADDRLEN - sizeof(struct sockaddr)];
} __aligned(sizeof(long));
-static int getsockaddr(struct sockaddr **namp, caddr_t uaddr, size_t len);
+static int getsockaddr(struct sockaddr **, caddr_t, size_t);
+static int kern_getsockname(struct thread *, int, struct sockaddr **,
+ socklen_t *);
+static int kern_listen(struct thread *, int, int);
+static int kern_shutdown(struct thread *, int, int);
+static int kern_socket(struct thread *, int, int, int);
+static int kern_socketpair(struct thread *, int, int, int, int *);
#endif /* __rtems__ */
static int sockargs(struct mbuf **, char *, socklen_t, int);
@@ -1837,11 +1843,6 @@ kern_getsockopt(struct thread *td, int s, int level, int name, void *val,
return (error);
}
-#ifdef __rtems__
-int
-kern_getsockname(struct thread *td, int fd, struct sockaddr **sa,
- socklen_t *alen);
-#endif /* __rtems__ */
/*
* getsockname1() - Get socket name.
*/
diff --git a/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h b/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h
index 095dcad..32dd7a7 100644
--- a/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h
+++ b/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h
@@ -2459,15 +2459,6 @@
#define kdebug_secpolicy_state _bsd_kdebug_secpolicy_state
#define kdebug_sockaddr _bsd_kdebug_sockaddr
#define kernel_sysctl _bsd_kernel_sysctl
-#define kern_getsockname _bsd_kern_getsockname
-#define kern_kevent_anonymous _bsd_kern_kevent_anonymous
-#define kern_listen _bsd_kern_listen
-#define kern_pipe _bsd_kern_pipe
-#define kern_select _bsd_kern_select
-#define kern_shutdown _bsd_kern_shutdown
-#define kern_socket _bsd_kern_socket
-#define kern_socketpair _bsd_kern_socketpair
-#define kern_uuidgen _bsd_kern_uuidgen
#define key_addref _bsd_key_addref
#define key_allocsa _bsd_key_allocsa
#define key_allocsa_policy _bsd_key_allocsa_policy
More information about the vc
mailing list