]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
rpcgen: include sys/ioctl.h on linux systems
authorMike Frysinger <vapier@gentoo.org>
Wed, 8 Oct 2008 15:08:55 +0000 (11:08 -0400)
committerSteve Dickson <steved@redhat.com>
Wed, 8 Oct 2008 15:08:55 +0000 (11:08 -0400)
The rpcgen tool included with nfs-utils will generate calls to ioctl() but not
actually generate the sys/ioctl.h header include.  Attached patch should fix
this.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
tools/rpcgen/rpc_main.c

index 6866f3cf40913ba8e71232831836152dcc886fc6..26f202b4f37de63058509a85486611a890fd1a18 100644 (file)
@@ -548,6 +548,9 @@ s_output(int argc, char **argv, char *infile, char *define, int extend,
 #ifndef linux
        if( !tirpcflag && inetdflag )
          f_print(fout, "#include <sys/ttycom.h>/* TIOCNOTTY */\n");
+#else
+       if( !tirpcflag )
+         f_print(fout, "#include <sys/ttycom.h>/* TIOCNOTTY */\n");
 #endif
        if( Cflag && (inetdflag || pmflag ) ) {
          f_print(fout, "#ifdef __cplusplus\n");