[PATCH] Fix the build of process_prefork.c
abartlet at samba.org
Thu Oct 19 19:02:31 UTC 2017
On Thu, 2017-10-19 at 11:47 -0700, Jeremy Allison via samba-technical
> On Thu, Oct 19, 2017 at 05:31:31PM +0200, Andreas Schneider via samba-technical wrote:
> > Hi,
> > Samba doesn't build for me since this has been committed. The error is:
> > error: implicit declaration of function ‘getpgrp’; did you mean ‘getpt’? [-
> > Werror=implicit-function-declaration]
> > unistd.h is missing for that function. The attached patch fixes it.
> > Review and push appreciated.
> LGTM. RB+ and pushed.
> > Andreas
> > --
> > Andreas Schneider GPG-ID: CC014E3D
> > www.cryptomilk.org asn at cryptomilk.org
> > From 85c70303ae00bbd108398b115a0bb7a1b8c270ca Mon Sep 17 00:00:00 2001
> > From: Andreas Schneider <asn at samba.org>
> > Date: Thu, 19 Oct 2017 17:27:23 +0200
> > Subject: [PATCH] s4:smbd: Add missing unistd.h include to fix build of
> > process_prefork
> > MIME-Version: 1.0
> > Content-Type: text/plain; charset=UTF-8
> > Content-Transfer-Encoding: 8bit
> > error: implicit declaration of function ‘getpgrp’; did you mean ‘getpt’?
> > [-Werror=implicit-function-declaration]
> > Signed-off-by: Andreas Schneider <asn at samba.org>
> > ---
> > source4/smbd/process_prefork.c | 2 ++
> > 1 file changed, 2 insertions(+)
> > diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c
> > index f2033e96146..8e4d62470a7 100644
> > --- a/source4/smbd/process_prefork.c
> > +++ b/source4/smbd/process_prefork.c
> > @@ -24,6 +24,8 @@
> > */
> > #include "includes.h"
> > +#include <unistd.h>
> > +
> > #include "lib/events/events.h"
> > #include "lib/messaging/messaging.h"
> > #include "lib/socket/socket.h"
> > --
> > 2.14.2
Once upon a time we had a rule not to include system headers directly,
but to bring this in via the lib/replace/system/ headers, eg
It doesn't seem to have made README.Coding however.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical