git.samba.org
/
obnox
/
samba-ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76d53e7
)
pidl: add dummy element for empty unions
author
Stefan Metzmacher
<metze@samba.org>
Fri, 2 Jan 2009 15:22:18 +0000
(16:22 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Fri, 2 Jan 2009 15:32:55 +0000
(16:32 +0100)
This hopefully fixes the build on Solaris and IRIX.
metze
pidl/lib/Parse/Pidl/Samba4/Header.pm
patch
|
blob
|
history
diff --git
a/pidl/lib/Parse/Pidl/Samba4/Header.pm
b/pidl/lib/Parse/Pidl/Samba4/Header.pm
index 94e1efbfe4925a201c17643b3ea3e28821b103e6..0411466c8251bf55f7adbe97113347ac97d62390 100644
(file)
--- 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 "}";