From: Mike Frysinger Date: Wed, 8 Oct 2008 15:08:55 +0000 (-0400) Subject: rpcgen: include sys/ioctl.h on linux systems X-Git-Tag: nfs-utils-1-1-4~2 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=fd705586d3ec76a5b324db151b87be1e4514f8af rpcgen: include sys/ioctl.h on linux systems 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 Signed-off-by: Steve Dickson --- diff --git a/tools/rpcgen/rpc_main.c b/tools/rpcgen/rpc_main.c index 6866f3c..26f202b 100644 --- a/tools/rpcgen/rpc_main.c +++ b/tools/rpcgen/rpc_main.c @@ -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 /* TIOCNOTTY */\n"); +#else + if( !tirpcflag ) + f_print(fout, "#include /* TIOCNOTTY */\n"); #endif if( Cflag && (inetdflag || pmflag ) ) { f_print(fout, "#ifdef __cplusplus\n");