diff options
author | se <se@FreeBSD.org> | 2007-06-16 14:39:25 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 2007-06-16 14:39:25 +0000 |
commit | 8761a2e70dd1ab24410abd4bcf3048f14d64cf6f (patch) | |
tree | 97a2061893dce417a94bbd77f1b0ac8c0166e08e /usr.bin/rpcgen/rpc_svcout.c | |
parent | 84b8595243e35552c3dd735b316920d4a7672f5e (diff) | |
download | FreeBSD-src-8761a2e70dd1ab24410abd4bcf3048f14d64cf6f.zip FreeBSD-src-8761a2e70dd1ab24410abd4bcf3048f14d64cf6f.tar.gz |
Never define the generated rpc server main function with storage type
"static". The header file generated by "rpcgen -h" will always declare
it as extern, leading to a "static after extern" error being issued by
gcc-4.2. This caused only a warning in gcc-3.x, but it has been wrong
all the time.
This change does not modify the code generated by "rpcgen -m", it only
affects rpcgen used to generate server stubs with a local main function.
This is the minimal patch. It does not remove the now obsolete "storage"
parameter from write_program() and write_programs() in an attempt to keep
differences to other systems' versions of rpcgen as small as possible.
Diffstat (limited to 'usr.bin/rpcgen/rpc_svcout.c')
-rw-r--r-- | usr.bin/rpcgen/rpc_svcout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c index 1f84467..e5e224e 100644 --- a/usr.bin/rpcgen/rpc_svcout.c +++ b/usr.bin/rpcgen/rpc_svcout.c @@ -126,7 +126,7 @@ serviced */\n"); write_svc_aux(nomain); } /* write out dispatcher and stubs */ - write_programs(nomain? (char *)NULL : "static"); + write_programs((char *)NULL); if (nomain) return; |