Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/net/lib/libsockin Some minor tweaks to make this co...
details: https://anonhg.NetBSD.org/src/rev/ceb050b45e4f
branches: trunk
changeset: 787092:ceb050b45e4f
user: pooka <pooka%NetBSD.org@localhost>
date: Sat Jun 01 11:46:14 2013 +0000
description:
Some minor tweaks to make this compile on Solaris.
diffstat:
sys/rump/net/lib/libsockin/rumpcomp_user.c | 36 ++++++++++-------------------
1 files changed, 13 insertions(+), 23 deletions(-)
diffs (96 lines):
diff -r d5618cd839bc -r ceb050b45e4f sys/rump/net/lib/libsockin/rumpcomp_user.c
--- a/sys/rump/net/lib/libsockin/rumpcomp_user.c Sat Jun 01 11:44:37 2013 +0000
+++ b/sys/rump/net/lib/libsockin/rumpcomp_user.c Sat Jun 01 11:46:14 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpcomp_user.c,v 1.6 2013/06/01 10:09:05 stacktic Exp $ */
+/* $NetBSD: rumpcomp_user.c,v 1.7 2013/06/01 11:46:14 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -25,13 +25,18 @@
* SUCH DAMAGE.
*/
+/* for struct msghdr content visibility */
+#define _XOPEN_SOURCE 4
+#define _XOPEN_SOURCE_EXTENDED 1
+
#ifndef _KERNEL
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include <poll.h>
-
+#include <stdlib.h>
+#include <string.h>
#include <stdint.h>
#include <rump/rumpuser_component.h>
@@ -53,9 +58,6 @@
#include <netinet/tcp.h>
#include <netinet/udp.h>
-#include <stdlib.h>
-#include <string.h>
-
static int translate_so_sockopt(int);
static int translate_ip_sockopt(int);
@@ -120,16 +122,8 @@
{
switch (domain) {
- translate(AF_UNIX);
translate(AF_INET);
- translate(AF_SNA);
- translate(AF_DECnet);
- translate(AF_APPLETALK);
- translate(AF_IPX);
translate(AF_INET6);
- translate(AF_ISDN);
- translate(AF_BLUETOOTH);
- translate(AF_ROUTE);
default: return AF_UNSPEC;
}
}
@@ -142,16 +136,8 @@
{
switch (domain) {
- translate_back(AF_UNIX);
translate_back(AF_INET);
- translate_back(AF_SNA);
- translate_back(AF_DECnet);
- translate_back(AF_APPLETALK);
- translate_back(AF_IPX);
translate_back(AF_INET6);
- translate_back(AF_ISDN);
- translate_back(AF_BLUETOOTH);
- translate_back(AF_ROUTE);
default: return RUMP_AF_UNSPEC;
}
}
@@ -215,7 +201,11 @@
{RUMP_MSG_CTRUNC, MSG_CTRUNC},
{RUMP_MSG_WAITALL, MSG_WAITALL},
{RUMP_MSG_DONTWAIT, MSG_DONTWAIT},
+
+ /* might be better to always set NOSIGNAL ... */
+#ifdef MSG_NOSIGNAL
{RUMP_MSG_NOSIGNAL, MSG_NOSIGNAL},
+#endif
};
static int native_to_bsd_msg_flags(int);
@@ -264,8 +254,8 @@
#endif
struct rump_sockaddr {
- __uint8_t sa_len; /* total length */
- __uint8_t sa_family; /* address family */
+ uint8_t sa_len; /* total length */
+ uint8_t sa_family; /* address family */
char sa_data[14]; /* actually longer; address value */
};
Home |
Main Index |
Thread Index |
Old Index