summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse/Pidl/Samba4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-02 16:22:18 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-02 16:32:55 +0100
commit96266d2f50b2f68e29c811908efecb78895e49bd (patch)
tree32d9ca74d0f0333a66839d1bb477b79e17c467d9 /pidl/lib/Parse/Pidl/Samba4
parent76d53e7648869bbdc83be1e07941467019b96321 (diff)
downloadsamba-96266d2f50b2f68e29c811908efecb78895e49bd.tar.gz
samba-96266d2f50b2f68e29c811908efecb78895e49bd.tar.bz2
samba-96266d2f50b2f68e29c811908efecb78895e49bd.zip
pidl: add dummy element for empty unions
This hopefully fixes the build on Solaris and IRIX. metze
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba4')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Header.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Header.pm b/pidl/lib/Parse/Pidl/Samba4/Header.pm
index 94e1efbfe4..0411466c82 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Header.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Header.pm
@@ -183,14 +183,20 @@ sub HeaderUnion($$;$)
return if (not defined($union->{ELEMENTS}));
pidl " {\n";
$tab_depth++;
+ my $needed = 0;
foreach my $e (@{$union->{ELEMENTS}}) {
if ($e->{TYPE} ne "EMPTY") {
if (! defined $done{$e->{NAME}}) {
HeaderElement($e);
}
$done{$e->{NAME}} = 1;
+ $needed++;
}
}
+ if (!$needed) {
+ # sigh - some compilers don't like empty structures
+ pidl tabs()."int _dummy_element;\n";
+ }
$tab_depth--;
pidl "}";