On 29/09/2017 13:13, Michael Fritscher wrote: > Signed-off-by: Michael Fritscher <mich...@fritscher.net> > --- > hw/9pfs/9p.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c > index 53f812ec06..e0ef1a2a6b 100644 > --- a/hw/9pfs/9p.c > +++ b/hw/9pfs/9p.c > @@ -3630,6 +3630,7 @@ void v9fs_reset(V9fsState *s) > > static void __attribute__((__constructor__)) v9fs_set_fd_limit(void) > { > +#ifndef _WIN32 > struct rlimit rlim; > if (getrlimit(RLIMIT_NOFILE, &rlim) < 0) { > error_report("Failed to get the resource limit"); > @@ -3637,4 +3638,5 @@ static void __attribute__((__constructor__)) > v9fs_set_fd_limit(void) > } > open_fd_hw = rlim.rlim_cur - MIN(400, rlim.rlim_cur/3); > open_fd_rc = rlim.rlim_cur/2; > +#endif > } >
There should be a function in util/oslib-* that returns the rlim_cur value. 9p obviously needs a nonzero value in open_fd_hw and open_fd_rc, so the last two lines need to be there for Win32 as well. Perhaps a stub implementation that just returns a fixed number (could be 1000?) is okay for Windows. Paolo