[PATCH] #ifdef code cleanup

Martin Schwenke martin at meltin.net
Fri Nov 30 05:57:35 UTC 2018


On Fri, 30 Nov 2018 15:13:30 +1100, Martin Schwenke via samba-technical
<samba-technical at lists.samba.org> wrote:

> On Thu, 29 Nov 2018 08:38:06 +0100, Andreas Schneider <asn at samba.org>
> wrote:
> 
> > On Thursday, 29 November 2018 08:00:39 CET Martin Schwenke wrote:
> > > On Thu, 29 Nov 2018 07:36:40 +0100, Andreas Schneider via
> > > 
> > > samba-technical <samba-technical at lists.samba.org> wrote:  
> > > > On Wednesday, 28 November 2018 20:52:22 CET Gary Lockyer wrote:  
> >  [...]  
> > > > 
> > > > Thanks Gary!!  
> > > 
> > > It looks like something (probably commit
> > > 63a48e64871cbfa36c4f9686a36a951711135114) broke the FreeBSD build:
> > > 
> > > [3442/3889] Compiling source3/winbindd/winbindd.c
> > > ../../source3/winbindd/winbindd.c:1615:47: error: use of undeclared
> > > identifier 'environ' setproctitle_init(argc, discard_const(argv), environ);
> > >                                                      ^
> > > It looks to be as simple as environ not being defined in replace.h, but
> > > I'm not completely sure if the fix is as simple as I think it
> > > is...  and my brain has melted by the end of the day.  :-)  
> > 
> > According to the manpage, this is provided by unistd.h. So the attached patch 
> > should fix this. Could you please check?
> 
> Yep, looks good, fixes the build.
> 
> Reviewed-by: Martin Schwenke <martin at meltin.net>
> 
> Pushed...

Hmmm... I've pulled the autobuild because this now falls over on AIX:

"/usr/include/unistd.h", line 201.17: 1506-343 (S) Redeclaration of lseek64 differs from previous declaration on line 199 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 201.17: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long".
"/usr/include/unistd.h", line 201.17: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/sys/lockf.h", line 64.20: 1506-343 (S) Redeclaration of lockf64 differs from previous declaration on line 62 of "/usr/include/sys/lockf.h".
"/usr/include/sys/lockf.h", line 64.20: 1506-377 (I) The type "long long" of parameter 3 differs from the previous type "long".
"/usr/include/unistd.h", line 920.33: 1506-343 (S) Redeclaration of ftruncate64 differs from previous declaration on line 918 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 920.33: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 977.33: 1506-343 (S) Redeclaration of truncate64 differs from previous declaration on line 975 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 977.33: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 996.33: 1506-343 (S) Redeclaration of pread64 differs from previous declaration on line 993 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 996.33: 1506-377 (I) The type "long long" of parameter 4 differs from the previous type "long".
"/usr/include/unistd.h", line 997.33: 1506-343 (S) Redeclaration of pwrite64 differs from previous declaration on line 994 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 997.33: 1506-377 (I) The type "long long" of parameter 4 differs from the previous type "long".
"/usr/include/unistd.h", line 1086.25: 1506-343 (S) Redeclaration of fclear64 differs from previous declaration on line 1083 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 1086.25: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long".
"/usr/include/unistd.h", line 1086.25: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 1087.25: 1506-343 (S) Redeclaration of fsync_range64 differs from previous declaration on line 1084 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 1087.25: 1506-377 (I) The type "long long" of parameter 3 differs from the previous type "long".

Trying to understand this...

peace & happiness,
martin



More information about the samba-technical mailing list