summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_socket.h
diff options
context:
space:
mode:
authorchs <chs@NetBSD.org>2010-11-02 18:02:59 +0000
committerchs <chs@NetBSD.org>2010-11-02 18:02:59 +0000
commit3c3115da20f482fe845ae6f40a003e1e386bdb6c (patch)
tree3c44ab368ede64def322a23830998e9cfbba3532 /sys/compat/linux/common/linux_socket.h
parent069ef5a4d01ff6a0f390ee6837cb4b20f5f2c32a (diff)
update linux_sys_socket() to understand the flags that are now
included in the "type" parameter. in linux_sys_sendmsg(), if we see an SCM_CREDENTIALS control message, just drop it instead of giving an error. the linux and native versions of the cred-passing operation are very different and some apps (eg. linux pulseaudio library talking to a native server) will work without the control data.
Diffstat (limited to 'sys/compat/linux/common/linux_socket.h')
-rw-r--r--sys/compat/linux/common/linux_socket.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/compat/linux/common/linux_socket.h b/sys/compat/linux/common/linux_socket.h
index 248234f4149..f7b559c359a 100644
--- a/sys/compat/linux/common/linux_socket.h
+++ b/sys/compat/linux/common/linux_socket.h
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_socket.h,v 1.19 2009/11/28 22:11:42 dsl Exp $ */
+/* $NetBSD: linux_socket.h,v 1.20 2010/11/02 18:03:00 chs Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -216,4 +216,15 @@ struct linux_cmsghdr {
#error Undefined linux_socket.h machine type.
#endif
+/*
+ * Flags for socket().
+ * These are provided in the "type" parameter.
+ */
+
+#define LINUX_SOCK_TYPE_MASK 0xf
+#define LINUX_SOCK_CLOEXEC LINUX_O_CLOEXEC
+#ifndef LINUX_SOCK_NONBLOCK
+#define LINUX_SOCK_NONBLOCK LINUX_O_NONBLOCK
+#endif
+
#endif /* !_LINUX_SOCKET_H */