mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
r3281: some compilers can't handle empty structures, so for empty IDL
structures generate a single _empty_ element in the header (This used to be commit 00ff1ca1d284bb698e98c773b18a29695e927605)
This commit is contained in:
parent
d3da369f91
commit
ba450de07c
@ -75,11 +75,17 @@ sub HeaderStruct($$)
|
||||
my($name) = shift;
|
||||
$res .= "\nstruct $name {\n";
|
||||
$tab_depth++;
|
||||
my $el_count=0;
|
||||
if (defined $struct->{ELEMENTS}) {
|
||||
foreach my $e (@{$struct->{ELEMENTS}}) {
|
||||
HeaderElement($e);
|
||||
$el_count++;
|
||||
}
|
||||
}
|
||||
if ($el_count == 0) {
|
||||
# some compilers can't handle empty structures
|
||||
$res .= "\tchar _empty_;\n";
|
||||
}
|
||||
$tab_depth--;
|
||||
$res .= "}";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user