summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/include/includes.h3
-rw-r--r--source4/librpc/ndr/ndr_orpc.h1
-rw-r--r--source4/librpc/rpc/dcerpc.h2
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm7
4 files changed, 10 insertions, 3 deletions
diff --git a/source4/include/includes.h b/source4/include/includes.h
index b613a18633..81105d227d 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -125,9 +125,6 @@ enum brl_type {
#include "libcli/nbt/libnbt.h"
#include "libcli/util/proto.h"
-/* FIXME: This header should be included by pidl where necessary */
-#include "librpc/ndr/ndr_compression.h"
-
#undef _PRINTF_ATTRIBUTE
#define _PRINTF_ATTRIBUTE(a1, a2)
diff --git a/source4/librpc/ndr/ndr_orpc.h b/source4/librpc/ndr/ndr_orpc.h
index 6c35d01067..171a783b8e 100644
--- a/source4/librpc/ndr/ndr_orpc.h
+++ b/source4/librpc/ndr/ndr_orpc.h
@@ -34,6 +34,7 @@ struct DUALSTRINGARRAY
struct SECURITYBINDING **securitybindings;
};
+#include "librpc/gen_ndr/orpc.h"
#include "librpc/ndr/ndr_orpc_proto.h"
#endif /* __NDR_ORPC_H__ */
diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h
index 7f44feb0d9..567246031a 100644
--- a/source4/librpc/rpc/dcerpc.h
+++ b/source4/librpc/rpc/dcerpc.h
@@ -24,6 +24,8 @@
#ifndef __DCERPC_H__
#define __DCERPC_H__
+#include "librpc/gen_ndr/dcerpc.h"
+
enum dcerpc_transport_t {
NCACN_NP, NCACN_IP_TCP, NCACN_IP_UDP, NCACN_VNS_IPC, NCACN_VNS_SPP,
NCACN_AT_DSP, NCADG_AT_DDP, NCALRPC, NCACN_UNIX_STREAM, NCADG_UNIX_DGRAM,
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 0b2cef54b8..4a1f8a9c14 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -2307,6 +2307,10 @@ sub ParseInterface($$)
pidl_hdr "";
+ if ($needed->{"compression"}) {
+ pidl "#include \"librpc/ndr/ndr_compression.h\"";
+ }
+
HeaderInterface($interface);
# Typedefs
@@ -2403,6 +2407,9 @@ sub NeededTypedef($$)
for my $e (@{$t->{DATA}->{ELEMENTS}}) {
$e->{PARENT} = $t->{DATA};
+ if (has_property($e, "compression")) {
+ $needed->{"compression"} = 1;
+ }
if ($needed->{"pull_$t->{NAME}"} and
not defined($needed->{"pull_$e->{TYPE}"})) {
$needed->{"pull_$e->{TYPE}"} = 1;