From: Mike Frysinger Date: Thu, 5 Jan 2012 18:21:24 +0000 (-0500) Subject: nfsctl: fix building with newer arches X-Git-Tag: nfs-utils-1-2-6-rc5~9 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=47e159ae88f03077a4746eb335d278399272f0ac;p=nfs-utils.git nfsctl: fix building with newer arches Newer arches omitting both nfsctl and nfsservctl which breaks nfsctl. Signed-off-by: Mike Frysinger Signed-off-by: Steve Dickson --- diff --git a/support/nfs/nfsctl.c b/support/nfs/nfsctl.c index 89fa1a4..fec775f 100644 --- a/support/nfs/nfsctl.c +++ b/support/nfs/nfsctl.c @@ -11,16 +11,22 @@ #endif #include +#include #include #include "nfslib.h" /* compatibility hack... */ -#ifndef __NR_nfsctl +#if !defined(__NR_nfsctl) && defined(__NR_nfsservctl) #define __NR_nfsctl __NR_nfsservctl #endif int nfsctl (int cmd, struct nfsctl_arg * argp, union nfsctl_res * resp) { +#ifdef __NR_nfsctl return syscall (__NR_nfsctl, cmd, argp, resp); +#else + errno = ENOSYS; + return -1; +#endif }