summaryrefslogtreecommitdiff
path: root/pidl/lib
diff options
context:
space:
mode:
Diffstat (limited to 'pidl/lib')
-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 "}";