diff options
-rw-r--r-- | source4/build/pidl/header.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm index 9f16c2655f..51983460ed 100644 --- a/source4/build/pidl/header.pm +++ b/source4/build/pidl/header.pm @@ -228,7 +228,12 @@ sub HeaderTypedefProto($) my($d) = shift; if (needed::is_needed("ndr_size_$d->{NAME}")) { - $res .= "size_t ndr_size_$d->{NAME}(const struct $d->{NAME} *r, int flags);\n"; + if ($d->{DATA}{TYPE} eq "STRUCT") { + $res .= "size_t ndr_size_$d->{NAME}(const struct $d->{NAME} *r, int flags);\n"; + } + if ($d->{DATA}{TYPE} eq "UNION") { + $res .= "size_t ndr_size_$d->{NAME}(const union $d->{NAME} *r, uint32_t level, int flags);\n"; + } } if (!util::has_property($d, "public")) { |