diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-01-05 13:21:24 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2012-01-05 15:42:40 -0500 |
commit | 47e159ae88f03077a4746eb335d278399272f0ac (patch) | |
tree | ea2a6cd7657c0b4a8efc0096ecdbaffab63485fa /support/nfs/nfsctl.c | |
parent | b4901af20f67730cc63e38dcfd70d66c8ccd677b (diff) | |
download | nfs-utils-47e159ae88f03077a4746eb335d278399272f0ac.tar.gz nfs-utils-47e159ae88f03077a4746eb335d278399272f0ac.tar.xz nfs-utils-47e159ae88f03077a4746eb335d278399272f0ac.zip |
nfsctl: fix building with newer arches
Newer arches omitting both nfsctl and nfsservctl which breaks nfsctl.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/nfs/nfsctl.c')
-rw-r--r-- | support/nfs/nfsctl.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 <unistd.h> +#include <errno.h> #include <asm/unistd.h> #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 } |