From 96266d2f50b2f68e29c811908efecb78895e49bd Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 2 Jan 2009 16:22:18 +0100 Subject: pidl: add dummy element for empty unions This hopefully fixes the build on Solaris and IRIX. metze --- pidl/lib/Parse/Pidl/Samba4/Header.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pidl') 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 "}"; -- cgit