diff options
Diffstat (limited to 'source4/build/pidl')
-rw-r--r-- | source4/build/pidl/parser.pm | 8 | ||||
-rwxr-xr-x | source4/build/pidl/pidl.pl | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index e06f3d4288..9d05f7f922 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -115,7 +115,9 @@ sub struct_alignment if ($structs{$e->{TYPE}}->{DATA}->{TYPE} eq "STRUCT") { $a = struct_alignment($structs{$e->{TYPE}}->{DATA}); } elsif ($structs{$e->{TYPE}}->{DATA}->{TYPE} eq "UNION") { - $a = union_alignment($structs{$e->{TYPE}}->{DATA}); + if (defined $structs{$e->{TYPE}}->{DATA}) { + $a = union_alignment($structs{$e->{TYPE}}->{DATA}); + } } } else { $a = util::type_align($e); @@ -140,6 +142,10 @@ sub union_alignment foreach my $e (@{$u->{DATA}}) { my $a = 1; + if ($e->{TYPE} eq "EMPTY") { + next; + } + if (!util::need_wire_pointer($e) && defined $structs{$e->{DATA}->{TYPE}}) { my $s = $structs{$e->{DATA}->{TYPE}}; diff --git a/source4/build/pidl/pidl.pl b/source4/build/pidl/pidl.pl index 484223d4aa..f68a722382 100755 --- a/source4/build/pidl/pidl.pl +++ b/source4/build/pidl/pidl.pl @@ -8,8 +8,8 @@ use strict; -use lib "$ENV{HOME}/pidl"; - +use FindBin qw($RealBin); +use lib "$RealBin"; use Getopt::Long; use idl; use dump; |