[PATCH] torture: Remove unnecesssary #include <fcntl.h> (was Re: [PATCH] Fix the FreeBSD build)
Christof Schmitt
cs at samba.org
Sat Sep 15 00:04:21 UTC 2018
On Sat, Sep 01, 2018 at 08:29:13AM +1200, Andrew Bartlett wrote:
> On Fri, 2018-08-31 at 13:27 -0700, Christof Schmitt wrote:
> > On Fri, Aug 31, 2018 at 10:15:35PM +1200, Andrew Bartlett via samba-
> > technical wrote:
> > >
> > > On Fri, 2018-08-31 at 06:27 +0200, Volker Lendecke via samba-
> > > technical
> > > wrote:
> > > >
> > > > Hi!
> > > >
> > > > Review appreciated!
> > > >
> > > > Thanks, Volker
> > > Also seems to be needed to build on current Fedora.
> > >
> > > Thanks!
> > >
> > > Reviewed-by: Andrew Bartlett <abartlet at samba.org>
> > That was from me, i should have looked closer how other files handle
> > these includes. Probably the #include <fcntl.h> can also be removed
> > as
> > this is then pulled in through filesys.h.
>
> Thanks Christof,
>
> Yes, we avoid bare includes of eg <fcntl.h> and try go go via one of
> the system/ headers from libreplace. This avoids littering files all
> over the tree with the inevitable #ifdef maze when someone wants to
> support 'odd' platforms.
Makes sense. Attached is a patch that removes the fcnl.h include again.
Christof
-------------- next part --------------
From 58629cecf8ab40f52e6435edea2abbb8fe29fe58 Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Fri, 14 Sep 2018 17:00:26 -0700
Subject: [PATCH] torture: Remove unnecesssary #include <fcntl.h>
This is now provided through system/filesys.h.
Signed-off-by: Christof Schmitt <cs at samba.org>
---
lib/util/tests/util.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/util/tests/util.c b/lib/util/tests/util.c
index d5ed34dfcaa..ad9c6606e59 100644
--- a/lib/util/tests/util.c
+++ b/lib/util/tests/util.c
@@ -19,7 +19,6 @@
*/
#include <talloc.h>
-#include <fcntl.h>
#include "replace.h"
#include "system/filesys.h"
--
2.17.0
More information about the samba-technical
mailing list