summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/charcnv.c1
-rw-r--r--source4/lib/cmdline/popt_common.h1
-rw-r--r--source4/lib/cmdline/readline.c1
-rw-r--r--source4/lib/dcom/common/main.c7
-rw-r--r--source4/lib/debug.c1
-rw-r--r--source4/lib/events/events.c1
-rw-r--r--source4/lib/fault.c1
-rw-r--r--source4/lib/gencache.c1
-rw-r--r--source4/lib/genrand.c5
-rw-r--r--source4/lib/iconv.c1
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.h1
-rw-r--r--source4/lib/ldb/tools/ldbadd.c4
-rw-r--r--source4/lib/ldb/tools/ldbdel.c4
-rw-r--r--source4/lib/ldb/tools/ldbedit.c4
-rw-r--r--source4/lib/ldb/tools/ldbmodify.c4
-rw-r--r--source4/lib/ldb/tools/ldbrename.c4
-rw-r--r--source4/lib/ldb/tools/ldbsearch.c4
-rw-r--r--source4/lib/ldb/tools/ldbtest.c4
-rw-r--r--source4/lib/messaging/messaging.c1
-rw-r--r--source4/lib/pidfile.c2
-rw-r--r--source4/lib/registry/reg_backend_dir.c1
-rw-r--r--source4/lib/registry/reg_backend_ldb.c8
-rw-r--r--source4/lib/registry/reg_backend_rpc.c6
-rw-r--r--source4/lib/registry/reg_samba.c2
-rw-r--r--source4/lib/select.c1
-rw-r--r--source4/lib/socket/socket.c1
-rw-r--r--source4/lib/socket/socket_ipv4.c1
-rw-r--r--source4/lib/socket/socket_ipv6.c1
-rw-r--r--source4/lib/socket/socket_unix.c1
-rw-r--r--source4/lib/system.c1
-rw-r--r--source4/lib/tdb/common/spinlock.c1
-rw-r--r--source4/lib/tdb/common/tdbutil.c2
-rw-r--r--source4/lib/tdb/tools/tdbdump.c1
-rw-r--r--source4/lib/tdb/tools/tdbtorture.c1
-rw-r--r--source4/lib/unix_privs.c1
-rw-r--r--source4/lib/username.c1
-rw-r--r--source4/lib/util.c1
-rw-r--r--source4/lib/util_file.c1
-rw-r--r--source4/lib/util_sock.c1
-rw-r--r--source4/lib/util_str.c1
40 files changed, 73 insertions, 13 deletions
diff --git a/source4/lib/charcnv.c b/source4/lib/charcnv.c
index 4cf5d00465..ea0fcd8d32 100644
--- a/source4/lib/charcnv.c
+++ b/source4/lib/charcnv.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
#include "system/iconv.h"
+#include "pstring.h"
/**
* @file
diff --git a/source4/lib/cmdline/popt_common.h b/source4/lib/cmdline/popt_common.h
index 06560d2be5..d6ae43d083 100644
--- a/source4/lib/cmdline/popt_common.h
+++ b/source4/lib/cmdline/popt_common.h
@@ -22,6 +22,7 @@
#define _POPT_COMMON_H
#include "popt.h"
+#include "pstring.h"
/* Common popt structures */
extern struct poptOption popt_common_samba[];
diff --git a/source4/lib/cmdline/readline.c b/source4/lib/cmdline/readline.c
index 8836759f70..4970638d41 100644
--- a/source4/lib/cmdline/readline.c
+++ b/source4/lib/cmdline/readline.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "pstring.h"
#include <unistd.h>
diff --git a/source4/lib/dcom/common/main.c b/source4/lib/dcom/common/main.c
index 01906501f1..a8324606f1 100644
--- a/source4/lib/dcom/common/main.c
+++ b/source4/lib/dcom/common/main.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "system/filesys.h"
#include "dlinklist.h"
#include "librpc/gen_ndr/ndr_epmapper.h"
#include "librpc/gen_ndr/ndr_remact.h"
@@ -145,7 +146,7 @@ WERROR dcom_ping(struct dcom_context *ctx)
static WERROR dcom_create_object_remote(struct dcom_context *ctx, struct GUID *clsid, const char *server, int num_ifaces, struct GUID *iid, struct dcom_interface_p ***ip, WERROR *results)
{
- uint16 protseq[] = DCOM_NEGOTIATED_PROTOCOLS;
+ uint16_t protseq[] = DCOM_NEGOTIATED_PROTOCOLS;
struct dcerpc_pipe *p;
struct dcom_object_exporter *m;
NTSTATUS status;
@@ -268,7 +269,7 @@ WERROR dcom_get_class_object_remote(struct dcom_context *ctx, struct GUID *clsid
struct DUALSTRINGARRAY dualstring;
NTSTATUS status;
struct pMInterfacePointer pm;
- uint16 protseq[] = DCOM_NEGOTIATED_PROTOCOLS;
+ uint16_t protseq[] = DCOM_NEGOTIATED_PROTOCOLS;
status = dcom_connect_host(ctx, &p, server);
if (NT_STATUS_IS_ERR(status)) {
@@ -498,7 +499,7 @@ NTSTATUS dcom_ifacep_from_OBJREF(struct dcom_context *ctx, struct dcom_interface
if (!m) {
struct dcerpc_pipe *po;
struct ResolveOxid r;
- uint16 protseq[] = DCOM_NEGOTIATED_PROTOCOLS;
+ uint16_t protseq[] = DCOM_NEGOTIATED_PROTOCOLS;
DEBUG(3, ("No binding data present yet, resolving OXID %llu\n", p->ox->oxid));
diff --git a/source4/lib/debug.c b/source4/lib/debug.c
index f1e9cec38e..ab012a98aa 100644
--- a/source4/lib/debug.c
+++ b/source4/lib/debug.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "system/filesys.h"
#include "dynconfig.h"
/* this global variable determines what messages are printed */
diff --git a/source4/lib/events/events.c b/source4/lib/events/events.c
index 140e3ff067..3460627399 100644
--- a/source4/lib/events/events.c
+++ b/source4/lib/events/events.c
@@ -57,6 +57,7 @@
#include "includes.h"
#include "system/time.h"
#include "system/select.h"
+#include "system/filesys.h"
#include "dlinklist.h"
#include "lib/events/events.h"
diff --git a/source4/lib/fault.c b/source4/lib/fault.c
index d90281f950..9f1e3f44bc 100644
--- a/source4/lib/fault.c
+++ b/source4/lib/fault.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "version.h"
#include "system/wait.h"
+#include "system/filesys.h"
static void (*cont_fn)(void *);
diff --git a/source4/lib/gencache.c b/source4/lib/gencache.c
index 8688683e8d..1a6159942d 100644
--- a/source4/lib/gencache.c
+++ b/source4/lib/gencache.c
@@ -24,6 +24,7 @@
#include "includes.h"
#include "lib/tdb/include/tdbutil.h"
#include "system/time.h"
+#include "system/filesys.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_TDB
diff --git a/source4/lib/genrand.c b/source4/lib/genrand.c
index 0f1d02b710..e3df9f9d90 100644
--- a/source4/lib/genrand.c
+++ b/source4/lib/genrand.c
@@ -22,10 +22,11 @@
#include "includes.h"
#include "system/iconv.h"
+#include "system/filesys.h"
#include "lib/crypto/crypto.h"
static unsigned char hash[258];
-static uint32 counter;
+static uint32_t counter;
static BOOL done_reseed = False;
static void (*reseed_callback)(int *newseed);
@@ -147,7 +148,7 @@ static void do_filehash(const char *fname, unsigned char *the_hash)
static int do_reseed(BOOL use_fd, int fd)
{
unsigned char seed_inbuf[40];
- uint32 v1, v2; struct timeval tval; pid_t mypid;
+ uint32_t v1, v2; struct timeval tval; pid_t mypid;
int reseed_data = 0;
if (use_fd) {
diff --git a/source4/lib/iconv.c b/source4/lib/iconv.c
index 181834d66a..df590444e5 100644
--- a/source4/lib/iconv.c
+++ b/source4/lib/iconv.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "dlinklist.h"
#include "system/iconv.h"
+#include "system/filesys.h"
/**
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.h b/source4/lib/ldb/ldb_tdb/ldb_tdb.h
index 0c644ffe5e..4c2fc52f7c 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.h
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.h
@@ -1,5 +1,6 @@
#ifdef _SAMBA_BUILD_
+#include "system/filesys.h"
#include "lib/tdb/include/tdb.h"
#else
#include "tdb.h"
diff --git a/source4/lib/ldb/tools/ldbadd.c b/source4/lib/ldb/tools/ldbadd.c
index d95036497a..927debc65e 100644
--- a/source4/lib/ldb/tools/ldbadd.c
+++ b/source4/lib/ldb/tools/ldbadd.c
@@ -36,6 +36,10 @@
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_private.h"
+#ifdef _SAMBA_BUILD_
+#include "system/filesys.h"
+#endif
+
static int failures;
static void usage(void)
diff --git a/source4/lib/ldb/tools/ldbdel.c b/source4/lib/ldb/tools/ldbdel.c
index 29d3b39730..2241a0b823 100644
--- a/source4/lib/ldb/tools/ldbdel.c
+++ b/source4/lib/ldb/tools/ldbdel.c
@@ -36,6 +36,10 @@
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_private.h"
+#ifdef _SAMBA_BUILD_
+#include "system/filesys.h"
+#endif
+
static int ldb_delete_recursive(struct ldb_context *ldb, const char *dn)
{
int ret, i, total=0;
diff --git a/source4/lib/ldb/tools/ldbedit.c b/source4/lib/ldb/tools/ldbedit.c
index 4c38ea6803..20cb7da810 100644
--- a/source4/lib/ldb/tools/ldbedit.c
+++ b/source4/lib/ldb/tools/ldbedit.c
@@ -36,6 +36,10 @@
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_private.h"
+#ifdef _SAMBA_BUILD_
+#include "system/filesys.h"
+#endif
+
static int verbose;
/*
diff --git a/source4/lib/ldb/tools/ldbmodify.c b/source4/lib/ldb/tools/ldbmodify.c
index 3bdb946897..97dec1050e 100644
--- a/source4/lib/ldb/tools/ldbmodify.c
+++ b/source4/lib/ldb/tools/ldbmodify.c
@@ -36,6 +36,10 @@
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_private.h"
+#ifdef _SAMBA_BUILD_
+#include "system/filesys.h"
+#endif
+
static int failures;
static void usage(void)
diff --git a/source4/lib/ldb/tools/ldbrename.c b/source4/lib/ldb/tools/ldbrename.c
index 3ee001cf23..ba870b0a45 100644
--- a/source4/lib/ldb/tools/ldbrename.c
+++ b/source4/lib/ldb/tools/ldbrename.c
@@ -38,6 +38,10 @@
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_private.h"
+#ifdef _SAMBA_BUILD_
+#include "system/filesys.h"
+#endif
+
static void usage(void)
{
printf("Usage: ldbrename [<options>] <olddn> <newdn>\n");
diff --git a/source4/lib/ldb/tools/ldbsearch.c b/source4/lib/ldb/tools/ldbsearch.c
index 5e0246d7a9..f764b28557 100644
--- a/source4/lib/ldb/tools/ldbsearch.c
+++ b/source4/lib/ldb/tools/ldbsearch.c
@@ -36,6 +36,10 @@
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_private.h"
+#ifdef _SAMBA_BUILD_
+#include "system/filesys.h"
+#endif
+
static void usage(void)
{
printf("Usage: ldbsearch <options> <expression> <attrs...>\n");
diff --git a/source4/lib/ldb/tools/ldbtest.c b/source4/lib/ldb/tools/ldbtest.c
index 01fa1b8ed7..67630d4458 100644
--- a/source4/lib/ldb/tools/ldbtest.c
+++ b/source4/lib/ldb/tools/ldbtest.c
@@ -36,6 +36,10 @@
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_private.h"
+#ifdef _SAMBA_BUILD_
+#include "system/filesys.h"
+#endif
+
static const char *ldb_url;
static const char *base_dn = "ou=Ldb Test,ou=People,o=University of Michigan,c=US";
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index aab13ba8af..df0216617d 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "lib/events/events.h"
+#include "system/filesys.h"
#include "system/time.h"
#include "messages.h"
#include "dlinklist.h"
diff --git a/source4/lib/pidfile.c b/source4/lib/pidfile.c
index f8041a2005..ff05c0606e 100644
--- a/source4/lib/pidfile.c
+++ b/source4/lib/pidfile.c
@@ -21,6 +21,8 @@
*/
#include "includes.h"
+#include "pstring.h"
+#include "system/filesys.h"
#ifndef O_NONBLOCK
#define O_NONBLOCK
diff --git a/source4/lib/registry/reg_backend_dir.c b/source4/lib/registry/reg_backend_dir.c
index bac0f43c20..68f02d1745 100644
--- a/source4/lib/registry/reg_backend_dir.c
+++ b/source4/lib/registry/reg_backend_dir.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "registry.h"
#include "system/dir.h"
+#include "system/filesys.h"
static WERROR reg_dir_add_key(TALLOC_CTX *mem_ctx, struct registry_key *parent, const char *name, uint32_t access_mask, struct security_descriptor *desc, struct registry_key **result)
{
diff --git a/source4/lib/registry/reg_backend_ldb.c b/source4/lib/registry/reg_backend_ldb.c
index 930ea9642e..c7b7bf587f 100644
--- a/source4/lib/registry/reg_backend_ldb.c
+++ b/source4/lib/registry/reg_backend_ldb.c
@@ -36,7 +36,7 @@ static int ldb_close_hive (void *_hive)
return 0;
}
-static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, struct ldb_message *msg, char **name, uint32 *type, void **data, int *len)
+static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, struct ldb_message *msg, char **name, uint32_t *type, void **data, int *len)
{
const struct ldb_val *val;
*name = talloc_strdup(mem_ctx, ldb_msg_find_string(msg, "value", NULL));
@@ -52,7 +52,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, struct ldb_message *msg, c
case REG_DWORD_LE:
*len = 4;
- *data = talloc(mem_ctx, uint32);
+ *data = talloc(mem_ctx, uint32_t);
SIVAL(*data, 0, strtol(val->data, NULL, 0));
break;
@@ -63,7 +63,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, struct ldb_message *msg, c
}
}
-static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx, TALLOC_CTX *mem_ctx, const char *name, uint32 type, void *data, int len)
+static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx, TALLOC_CTX *mem_ctx, const char *name, uint32_t type, void *data, int len)
{
struct ldb_val val;
struct ldb_message *msg = talloc_zero(mem_ctx, struct ldb_message);
@@ -322,7 +322,7 @@ static WERROR ldb_del_value (struct registry_key *key, const char *child)
return WERR_OK;
}
-static WERROR ldb_set_value (struct registry_key *parent, const char *name, uint32 type, void *data, int len)
+static WERROR ldb_set_value (struct registry_key *parent, const char *name, uint32_t type, void *data, int len)
{
struct ldb_context *ctx = parent->hive->backend_data;
struct ldb_message *msg;
diff --git a/source4/lib/registry/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc.c
index d2809f644a..2302416554 100644
--- a/source4/lib/registry/reg_backend_rpc.c
+++ b/source4/lib/registry/reg_backend_rpc.c
@@ -78,7 +78,7 @@ struct rpc_key_data {
};
struct {
- uint32 hkey;
+ uint32_t hkey;
WERROR (*open) (struct dcerpc_pipe *p, TALLOC_CTX *, struct policy_handle *h);
} known_hives[] = {
{ HKEY_LOCAL_MACHINE, open_HKLM },
@@ -93,7 +93,7 @@ struct {
static WERROR rpc_query_key(struct registry_key *k);
-static WERROR rpc_get_predefined_key (struct registry_context *ctx, uint32 hkey_type, struct registry_key **k)
+static WERROR rpc_get_predefined_key (struct registry_context *ctx, uint32_t hkey_type, struct registry_key **k)
{
int n;
struct registry_hive *h;
@@ -185,7 +185,7 @@ static WERROR rpc_get_value_by_index(TALLOC_CTX *mem_ctx, struct registry_key *p
struct rpc_key_data *mykeydata = parent->backend_data;
WERROR error;
struct winreg_EnumValue r;
- uint32 type, len1, zero = 0;
+ uint32_t type, len1, zero = 0;
NTSTATUS status;
uint8_t buf8;
uint16_t buf16;
diff --git a/source4/lib/registry/reg_samba.c b/source4/lib/registry/reg_samba.c
index a81b9e5a42..7188109daa 100644
--- a/source4/lib/registry/reg_samba.c
+++ b/source4/lib/registry/reg_samba.c
@@ -23,7 +23,7 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
-static WERROR reg_samba_get_predef (struct registry_context *ctx, uint32 hkey, struct registry_key **k)
+static WERROR reg_samba_get_predef (struct registry_context *ctx, uint32_t hkey, struct registry_key **k)
{
WERROR error;
const char *conf;
diff --git a/source4/lib/select.c b/source4/lib/select.c
index 5d7e4a0ad2..bed02304cc 100644
--- a/source4/lib/select.c
+++ b/source4/lib/select.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "system/filesys.h"
/* This is here because it allows us to avoid a nasty race in signal handling.
We need to guarantee that when we get a signal we get out of a select immediately
diff --git a/source4/lib/socket/socket.c b/source4/lib/socket/socket.c
index 97176ea150..109a7cadc0 100644
--- a/source4/lib/socket/socket.c
+++ b/source4/lib/socket/socket.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "system/filesys.h"
/*
auto-close sockets on free
diff --git a/source4/lib/socket/socket_ipv4.c b/source4/lib/socket/socket_ipv4.c
index 09a4b4a73a..2a212fbc94 100644
--- a/source4/lib/socket/socket_ipv4.c
+++ b/source4/lib/socket/socket_ipv4.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "system/network.h"
+#include "system/filesys.h"
static NTSTATUS ipv4_init(struct socket_context *sock)
{
diff --git a/source4/lib/socket/socket_ipv6.c b/source4/lib/socket/socket_ipv6.c
index f5cd756259..d7241d9b38 100644
--- a/source4/lib/socket/socket_ipv6.c
+++ b/source4/lib/socket/socket_ipv6.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "system/network.h"
+#include "system/filesys.h"
static struct in6_addr interpret_addr6(const char *name)
{
diff --git a/source4/lib/socket/socket_unix.c b/source4/lib/socket/socket_unix.c
index e23aa0d97e..2bcce0eb11 100644
--- a/source4/lib/socket/socket_unix.c
+++ b/source4/lib/socket/socket_unix.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "system/network.h"
+#include "system/filesys.h"
diff --git a/source4/lib/system.c b/source4/lib/system.c
index b23529f5fe..eb3799c7ca 100644
--- a/source4/lib/system.c
+++ b/source4/lib/system.c
@@ -23,6 +23,7 @@
#include "system/network.h"
#include "system/wait.h"
#include "system/filesys.h"
+#include "pstring.h"
/*
The idea is that this file will eventually have wrappers around all
diff --git a/source4/lib/tdb/common/spinlock.c b/source4/lib/tdb/common/spinlock.c
index 001f0c3bc1..232cd8dfc6 100644
--- a/source4/lib/tdb/common/spinlock.c
+++ b/source4/lib/tdb/common/spinlock.c
@@ -43,6 +43,7 @@
#else
#include "includes.h"
#include "lib/tdb/include/tdb.h"
+#include "system/filesys.h"
#endif
#ifdef USE_SPINLOCKS
diff --git a/source4/lib/tdb/common/tdbutil.c b/source4/lib/tdb/common/tdbutil.c
index 02a1d66cbe..e3c5641054 100644
--- a/source4/lib/tdb/common/tdbutil.c
+++ b/source4/lib/tdb/common/tdbutil.c
@@ -22,7 +22,9 @@
#include "lib/tdb/include/tdbutil.h"
#include "system/glob.h"
#include "system/wait.h"
+#include "system/filesys.h"
#include "dlinklist.h"
+#include "pstring.h"
/* these are little tdb utility functions that are meant to make
dealing with a tdb database a little less cumbersome in Samba */
diff --git a/source4/lib/tdb/tools/tdbdump.c b/source4/lib/tdb/tools/tdbdump.c
index 8aa573ca9b..774093dbc0 100644
--- a/source4/lib/tdb/tools/tdbdump.c
+++ b/source4/lib/tdb/tools/tdbdump.c
@@ -39,6 +39,7 @@
#include "includes.h"
#include "lib/tdb/include/tdb.h"
#include "system/iconv.h"
+#include "system/filesys.h"
#endif
diff --git a/source4/lib/tdb/tools/tdbtorture.c b/source4/lib/tdb/tools/tdbtorture.c
index 63b3b0d381..7e8e77952c 100644
--- a/source4/lib/tdb/tools/tdbtorture.c
+++ b/source4/lib/tdb/tools/tdbtorture.c
@@ -24,6 +24,7 @@
#include "lib/tdb/include/tdb.h"
#include "system/time.h"
#include "system/wait.h"
+#include "system/filesys.h"
#endif
diff --git a/source4/lib/unix_privs.c b/source4/lib/unix_privs.c
index a57f4359d3..b59657b7d5 100644
--- a/source4/lib/unix_privs.c
+++ b/source4/lib/unix_privs.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "system/passwd.h"
+#include "system/filesys.h"
/*
there are times when smbd needs to temporarily gain root privileges
diff --git a/source4/lib/username.c b/source4/lib/username.c
index 1c8e5aa2bb..55965a7980 100644
--- a/source4/lib/username.c
+++ b/source4/lib/username.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "pstring.h"
/*****************************************************************
Splits passed user or group name to domain and user/group name parts
diff --git a/source4/lib/util.c b/source4/lib/util.c
index dba2dbfe87..af41a20aa5 100644
--- a/source4/lib/util.c
+++ b/source4/lib/util.c
@@ -26,6 +26,7 @@
#include "dynconfig.h"
#include "system/network.h"
#include "system/iconv.h"
+#include "system/filesys.h"
/**************************************************************************n
Find a suitable temporary directory. The result should be copied immediately
diff --git a/source4/lib/util_file.c b/source4/lib/util_file.c
index 2b2fe2b2af..6d234b571c 100644
--- a/source4/lib/util_file.c
+++ b/source4/lib/util_file.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "system/shmem.h"
+#include "system/filesys.h"
/*************************************************************************
gets a line out of a file.
diff --git a/source4/lib/util_sock.c b/source4/lib/util_sock.c
index b2f949ebe5..d60fbb3451 100644
--- a/source4/lib/util_sock.c
+++ b/source4/lib/util_sock.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "system/network.h"
+#include "pstring.h"
enum SOCK_OPT_TYPES {OPT_BOOL,OPT_INT,OPT_ON};
diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c
index d9c4e30d6a..dc39da50c7 100644
--- a/source4/lib/util_str.c
+++ b/source4/lib/util_str.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "system/iconv.h"
+#include "pstring.h"
/**
* @file