summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4/svr4_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/svr4/svr4_socket.c')
-rw-r--r--sys/compat/svr4/svr4_socket.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/compat/svr4/svr4_socket.c b/sys/compat/svr4/svr4_socket.c
index 038267c..736f618 100644
--- a/sys/compat/svr4/svr4_socket.c
+++ b/sys/compat/svr4/svr4_socket.c
@@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$");
#include <compat/svr4/svr4_signal.h>
#include <compat/svr4/svr4_sockmod.h>
#include <compat/svr4/svr4_proto.h>
+#include <compat/svr4/svr4_stropts.h>
struct svr4_sockcache_entry {
struct proc *p; /* Process for the socket */
@@ -168,6 +169,19 @@ svr4_delete_socket(p, fp)
mtx_unlock(&svr4_sockcache_lock);
}
+struct svr4_strm *
+svr4_stream_get(fp)
+ struct file *fp;
+{
+ struct socket *so;
+
+ if (fp == NULL || fp->f_type != DTYPE_SOCKET)
+ return NULL;
+
+ so = fp->f_data;
+ return so->so_emuldata;
+}
+
void
svr4_purge_sockcache(arg, p)
void *arg;
OpenPOWER on IntegriCloud