ctdb-build: Tweak hacking of rpcgen output
authorMartin Schwenke <martin@meltin.net>
Tue, 25 Jun 2019 00:03:44 +0000 (10:03 +1000)
committerAmitay Isaacs <amitay@samba.org>
Fri, 5 Jul 2019 05:03:25 +0000 (05:03 +0000)
csbuild doesn't like the hack where variable buf is initialised to
itself to avoid an unused variable warning.  buf is unused so remove
it instead.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/wscript

index 614e042bd70fc6cc1fbc7d0747c97a89e59b560b..51a09fdc63dc996ffc44b54f89f96f5c3d32a0ee 100644 (file)
@@ -634,7 +634,7 @@ def build(bld):
                         target='utils/smnotify/smnotify.h',
                         rule='rpcgen -h ${SRC} > ${TGT}')
 
-    xdr_buf_hack = 'sed -e "s@^\([ \t]*register int32_t \*buf\);@\\1 = buf;@"'
+    xdr_buf_hack = 'grep -Fv "register int32_t *buf;"'
 
     bld.SAMBA_GENERATOR('ctdb-smnotify-x',
                         source='utils/smnotify/smnotify.x',