Only do the compat cruft if we are compiling libc.
This commit is contained in:
parent
eda86e9458
commit
6821cf5fc4
|
@ -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.13 2015/11/07 14:21:32 christos Exp $");
|
|||
* 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;
|
||||
|
|
|
@ -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 2015/11/07 23:17:09 christos Exp $");
|
|||
|
||||
#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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue