From 861c979329f1695c67d8f23bf3b28f0f7d44cad9 Mon Sep 17 00:00:00 2001 From: Gleb Popov <6yearold@gmail.com> Date: Sat, 12 Oct 2024 21:26:22 +0300 Subject: [PATCH] Fix build against old Samba by including necessary system headers --- src/adldap/samba/gp_manage.h | 4 ++++ src/adldap/samba/security_descriptor.h | 4 ++++ src/adldap/samba/src_older/dom_sid.c | 4 ++++ src/adldap/samba/src_older/dom_sid.h | 4 ++++ src/adldap/samba/src_older/ndr_misc.h | 4 ++++ src/adldap/samba/src_older/ndr_security.h | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/src/adldap/samba/gp_manage.h b/src/adldap/samba/gp_manage.h index 4a384d14..2a1e8fd1 100644 --- a/src/adldap/samba/gp_manage.h +++ b/src/adldap/samba/gp_manage.h @@ -29,6 +29,10 @@ extern "C" { #ifndef GP_MANAGE_H #define GP_MANAGE_H +// time.h and unistd.h Are needed before including ndr.h when building against old samba (4.16) +#include +#include + #include #include #include diff --git a/src/adldap/samba/security_descriptor.h b/src/adldap/samba/security_descriptor.h index 5dd5ce3f..09f1565b 100644 --- a/src/adldap/samba/security_descriptor.h +++ b/src/adldap/samba/security_descriptor.h @@ -30,6 +30,10 @@ extern "C" { #ifndef __SECURITY_DESCRIPTOR_H__ #define __SECURITY_DESCRIPTOR_H__ +// time.h and unistd.h Are needed before including ndr.h when building against old samba (4.16) +#include +#include + #include #include diff --git a/src/adldap/samba/src_older/dom_sid.c b/src/adldap/samba/src_older/dom_sid.c index 96192773..aaa5666c 100644 --- a/src/adldap/samba/src_older/dom_sid.c +++ b/src/adldap/samba/src_older/dom_sid.c @@ -20,6 +20,10 @@ along with this program. If not, see . */ +// time.h and unistd.h Are needed before including gen_ndr/security.h when building against old samba (4.16) +#include +#include + #include "replace.h" #include "util/data_blob.h" #include "gen_ndr/security.h" diff --git a/src/adldap/samba/src_older/dom_sid.h b/src/adldap/samba/src_older/dom_sid.h index 270c2ac0..4a3dee98 100644 --- a/src/adldap/samba/src_older/dom_sid.h +++ b/src/adldap/samba/src_older/dom_sid.h @@ -32,6 +32,10 @@ extern "C" { #endif +// time.h and unistd.h are needed before including gen_ndr/security.h when building against old samba (4.16) +#include +#include + #include "replace.h" #include #include "util/data_blob.h" diff --git a/src/adldap/samba/src_older/ndr_misc.h b/src/adldap/samba/src_older/ndr_misc.h index 14a122fc..1b0dea91 100644 --- a/src/adldap/samba/src_older/ndr_misc.h +++ b/src/adldap/samba/src_older/ndr_misc.h @@ -25,6 +25,10 @@ extern "C" { #endif +// time.h and unistd.h are needed before including ndr.h when building against old samba (4.16) +#include +#include + #include /* header auto-generated by pidl */ diff --git a/src/adldap/samba/src_older/ndr_security.h b/src/adldap/samba/src_older/ndr_security.h index e715f9e3..4009d3b7 100644 --- a/src/adldap/samba/src_older/ndr_security.h +++ b/src/adldap/samba/src_older/ndr_security.h @@ -25,6 +25,10 @@ extern "C" { #endif +// time.h and unistd.h are needed before including ndr.h when building against old samba (4.16) +#include +#include + #include #include