lib/util: Clean up includes for xfile.[ch]
authorMartin Schwenke <martin@meltin.net>
Mon, 22 Sep 2014 09:21:42 +0000 (19:21 +1000)
committerJeremy Allison <jra@samba.org>
Fri, 3 Oct 2014 22:11:20 +0000 (00:11 +0200)
The include files added to xfile.h are already included
unconditionally elsewhere (replace.h, samba_util.h, ...) so Samba
can't be built without them.

To minimise dependencies, only include specific util headers instead
of samba_util.h.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/xfile.c
lib/util/xfile.h

index 58a34bf1c34a9cb060a0e7539c134d8eb0f7af9b..62dd1213a75d9983db265c63d18781b6963bb108 100644 (file)
@@ -35,7 +35,8 @@
 
 #include "replace.h"
 #include "system/filesys.h"
-#include "lib/util/samba_util.h"
+#include "memory.h"
+#include "xfile.h"
 
 #define XBUFSIZE BUFSIZ
 
index 1b1592999745ccd7c93ca07f9222ce612c771ad0..f52596dc8a8a2924eba563888b8f671ef6388412 100644 (file)
 
 #ifndef _XFILE_H_
 #define _XFILE_H_
+
+#include <stdarg.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include "attr.h"
+
 /*
   see xfile.c for explanations
 */