X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Fnfssvc.c;h=38240a020f190ffbe12c5591752929e1c6baed30;hp=dae16f7f7adc59a540b565e210e8861f71cacd37;hb=ac5b03be829b4c9369ebfb07a688308721103228;hpb=1c4fdb00a0cb5208294d745e7491ce58b153606b diff --git a/support/nfs/nfssvc.c b/support/nfs/nfssvc.c index dae16f7..38240a0 100644 --- a/support/nfs/nfssvc.c +++ b/support/nfs/nfssvc.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -19,7 +21,9 @@ nfssvc(int port, int nrservs) struct nfsctl_arg arg; int fd; - fd = open("/proc/fs/nfs/threads", O_WRONLY); + fd = open("/proc/fs/nfsd/threads", O_WRONLY); + if (fd < 0) + fd = open("/proc/fs/nfs/threads", O_WRONLY); if (fd >= 0) { /* 2.5+ kernel with nfsd filesystem mounted. * Just write the number in.