summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-05-31 20:33:18 +0000
committerphk <phk@FreeBSD.org>2003-05-31 20:33:18 +0000
commite582dcfe26602039ca7f42eaa404338237720a1a (patch)
tree4c828d39dd1e87da3bbe23be42fecee274ca83e6 /sys/compat/svr4
parent2048912526464c943ca01eb049aa45a6f63814b6 (diff)
downloadFreeBSD-src-e582dcfe26602039ca7f42eaa404338237720a1a.zip
FreeBSD-src-e582dcfe26602039ca7f42eaa404338237720a1a.tar.gz
Put definition of struct svr4_sockcache_entry in a .h file rather than
having two independent definitions in two .c files. Fiddle surrounding details to match. Found by: FlexeLint
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r--sys/compat/svr4/svr4_socket.c12
-rw-r--r--sys/compat/svr4/svr4_socket.h13
-rw-r--r--sys/compat/svr4/svr4_stat.c1
-rw-r--r--sys/compat/svr4/svr4_sysvec.c1
4 files changed, 14 insertions, 13 deletions
diff --git a/sys/compat/svr4/svr4_socket.c b/sys/compat/svr4/svr4_socket.c
index b5da396..a1c7adc 100644
--- a/sys/compat/svr4/svr4_socket.c
+++ b/sys/compat/svr4/svr4_socket.c
@@ -62,18 +62,6 @@
#include <compat/svr4/svr4_sockmod.h>
#include <compat/svr4/svr4_proto.h>
-struct svr4_sockcache_entry {
- struct proc *p; /* Process for the socket */
- void *cookie; /* Internal cookie used for matching */
- struct sockaddr_un sock;/* Pathname for the socket */
- udev_t dev; /* Device where the socket lives on */
- ino_t ino; /* Inode where the socket lives on */
- TAILQ_ENTRY(svr4_sockcache_entry) entries;
-};
-
-extern TAILQ_HEAD(svr4_sockcache_head, svr4_sockcache_entry) svr4_head;
-extern int svr4_str_initialized;
-
struct sockaddr_un *
svr4_find_socket(td, fp, dev, ino)
struct thread *td;
diff --git a/sys/compat/svr4/svr4_socket.h b/sys/compat/svr4/svr4_socket.h
index 434f1f2..b4b38f9 100644
--- a/sys/compat/svr4/svr4_socket.h
+++ b/sys/compat/svr4/svr4_socket.h
@@ -53,4 +53,17 @@ struct sockaddr_un *svr4_find_socket(struct thread *, struct file *,
void svr4_delete_socket(struct proc *, struct file *);
int svr4_add_socket(struct thread *, const char *, struct stat *);
+struct svr4_sockcache_entry {
+ struct proc *p; /* Process for the socket */
+ void *cookie; /* Internal cookie used for matching */
+ struct sockaddr_un sock;/* Pathname for the socket */
+ udev_t dev; /* Device where the socket lives on */
+ ino_t ino; /* Inode where the socket lives on */
+ TAILQ_ENTRY(svr4_sockcache_entry) entries;
+};
+
+TAILQ_HEAD(svr4_sockcache_head, svr4_sockcache_entry);
+extern struct svr4_sockcache_head svr4_head;
+extern int svr4_str_initialized;
+
#endif /* _SVR4_SOCKET_H_ */
diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c
index 51576b9..6f67a9f 100644
--- a/sys/compat/svr4/svr4_stat.c
+++ b/sys/compat/svr4/svr4_stat.c
@@ -39,6 +39,7 @@
#include <sys/time.h>
#include <sys/sysctl.h>
#include <sys/sysproto.h>
+#include <sys/un.h>
#include <vm/vm.h>
diff --git a/sys/compat/svr4/svr4_sysvec.c b/sys/compat/svr4/svr4_sysvec.c
index ec8ce8b..8abcbb2 100644
--- a/sys/compat/svr4/svr4_sysvec.c
+++ b/sys/compat/svr4/svr4_sysvec.c
@@ -61,7 +61,6 @@
#include <compat/svr4/svr4_syscall.h>
#include <compat/svr4/svr4_signal.h>
#include <compat/svr4/svr4_sockio.h>
-#include <compat/svr4/svr4_socket.h>
#include <compat/svr4/svr4_errno.h>
#include <compat/svr4/svr4_proto.h>
#include <compat/svr4/svr4_siginfo.h>
OpenPOWER on IntegriCloud