linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfsctl: fix building with newer arches
@ 2011-12-08  5:51 Mike Frysinger
  2012-01-05 21:42 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2011-12-08  5:51 UTC (permalink / raw)
  To: linux-nfs

Newer arches omitting both nfsctl and nfsservctl which breaks nfsctl.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 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
 }
-- 
1.7.6.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfsctl: fix building with newer arches
  2011-12-08  5:51 [PATCH] nfsctl: fix building with newer arches Mike Frysinger
@ 2012-01-05 21:42 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2012-01-05 21:42 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: Linux NFS Mailing list



On 12/08/2011 12:51 AM, Mike Frysinger wrote:
> Newer arches omitting both nfsctl and nfsservctl which breaks nfsctl.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Committed...

steved.
> ---
>  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
>  }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-05 21:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-08  5:51 [PATCH] nfsctl: fix building with newer arches Mike Frysinger
2012-01-05 21:42 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).