Module Name: src
Committed By: christos
Date: Sun Nov 8 02:46:53 UTC 2015
Modified Files:
src/lib/libc/rpc: rpc_commondata.c svc_fdset.c svc_fdset.h
Log Message:
Only do the compat cruft if we are compiling libc.
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/rpc/rpc_commondata.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/rpc/svc_fdset.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/rpc/svc_fdset.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/rpc/rpc_commondata.c
diff -u src/lib/libc/rpc/rpc_commondata.c:1.13 src/lib/libc/rpc/rpc_commondata.c:1.14
--- src/lib/libc/rpc/rpc_commondata.c:1.13 Sat Nov 7 09:21:32 2015
+++ src/lib/libc/rpc/rpc_commondata.c Sat Nov 7 21:46:53 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: rpc_commondata.c,v 1.13 2015/11/07 14:21:32 christos Exp $ */
+/* $NetBSD: rpc_commondata.c,v 1.14 2015/11/08 02:46:53 christos Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
@@ -36,7 +36,7 @@
#if 0
static char *sccsid = "@(#)rpc_commondata.c 2.1 88/07/29 4.0 RPCSRC";
#else
-__RCSID("$NetBSD: rpc_commondata.c,v 1.13 2015/11/07 14:21:32 christos Exp $");
+__RCSID("$NetBSD: rpc_commondata.c,v 1.14 2015/11/08 02:46:53 christos Exp $");
#endif
#endif
@@ -48,10 +48,12 @@ __RCSID("$NetBSD: rpc_commondata.c,v 1.1
* by public interfaces
*/
struct opaque_auth _null_auth;
+#ifdef _LIBC
#undef svc_fdset
__fd_set_256 svc_fdset;
#undef svc_maxfd
int svc_maxfd = -1;
+#endif
#ifndef _REENTRANT
#undef rpc_createerr
struct rpc_createerr rpc_createerr;
Index: src/lib/libc/rpc/svc_fdset.c
diff -u src/lib/libc/rpc/svc_fdset.c:1.10 src/lib/libc/rpc/svc_fdset.c:1.11
--- src/lib/libc/rpc/svc_fdset.c:1.10 Sat Nov 7 18:17:09 2015
+++ src/lib/libc/rpc/svc_fdset.c Sat Nov 7 21:46:53 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: svc_fdset.c,v 1.10 2015/11/07 23:17:09 christos Exp $ */
+/* $NetBSD: svc_fdset.c,v 1.11 2015/11/08 02:46:53 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: svc_fdset.c,v 1.10 2015/11/07 23:17:09 christos Exp $");
+__RCSID("$NetBSD: svc_fdset.c,v 1.11 2015/11/08 02:46:53 christos Exp $");
#include "reentrant.h"
@@ -53,7 +53,9 @@ __RCSID("$NetBSD: svc_fdset.c,v 1.10 201
#undef svc_fdset
#undef svc_maxfd
+#ifdef _LIBC
extern __fd_set_256 svc_fdset;
+#endif
extern int svc_maxfd;
int __svc_flags;
@@ -132,11 +134,13 @@ svc_fdset_sanitize(struct svc_fdset *fds
{
while (fds->fdmax >= 0 && !FD_ISSET(fds->fdmax, fds->fdset))
fds->fdmax--;
+#ifdef _LIBC
/* Compat update */
if (fds == &__svc_fdset) {
svc_fdset = *(__fd_set_256 *)__svc_fdset.fdset;
svc_maxfd = __svc_fdset.fdmax;
}
+#endif
}
static void
Index: src/lib/libc/rpc/svc_fdset.h
diff -u src/lib/libc/rpc/svc_fdset.h:1.3 src/lib/libc/rpc/svc_fdset.h:1.4
--- src/lib/libc/rpc/svc_fdset.h:1.3 Fri Nov 6 19:42:04 2015
+++ src/lib/libc/rpc/svc_fdset.h Sat Nov 7 21:46:53 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: svc_fdset.h,v 1.3 2015/11/07 00:42:04 christos Exp $ */
+/* $NetBSD: svc_fdset.h,v 1.4 2015/11/08 02:46:53 christos Exp $ */
# ifdef RUMP_RPC
# include <rump/rump.h>
@@ -17,6 +17,8 @@
# define select(a, b, c, d, e) rump_sys_select(a, b, c, d, e)
# endif
+#ifdef _LIBC
typedef struct __fd_set_256 {
__fd_mask fds_bits[__NFD_LEN(256)];
} __fd_set_256;
+#endif