summaryrefslogtreecommitdiff
path: root/source4/include/system
diff options
context:
space:
mode:
Diffstat (limited to 'source4/include/system')
-rw-r--r--source4/include/system/filesys.h16
-rw-r--r--source4/include/system/iconv.h6
-rw-r--r--source4/include/system/network.h16
-rw-r--r--source4/include/system/passwd.h12
4 files changed, 50 insertions, 0 deletions
diff --git a/source4/include/system/filesys.h b/source4/include/system/filesys.h
index dc13e148e5..1ddb6b687c 100644
--- a/source4/include/system/filesys.h
+++ b/source4/include/system/filesys.h
@@ -99,6 +99,15 @@
#include <sys/xattr.h>
#endif
+/* Load header file for dynamic linking stuff */
+#ifdef HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#ifndef RTLD_LAZY
+#define RTLD_LAZY 0
+#endif
+
/* Some POSIX definitions for those without */
@@ -145,3 +154,10 @@
#define S_IXOTH 00001 /* execute permission: other */
#endif
+#ifndef O_ACCMODE
+#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
+#endif
+
+#ifndef HAVE_RENAME
+int rename(const char *zfrom, const char *zto);
+#endif
diff --git a/source4/include/system/iconv.h b/source4/include/system/iconv.h
index c70fc6b242..bace51c029 100644
--- a/source4/include/system/iconv.h
+++ b/source4/include/system/iconv.h
@@ -33,3 +33,9 @@
#include <ctype.h>
#endif
+/* needed for some systems without iconv. Doesn't really matter
+ what error code we use */
+#ifndef EILSEQ
+#define EILSEQ EIO
+#endif
+
diff --git a/source4/include/system/network.h b/source4/include/system/network.h
index 8b9fe0bcc5..d380245865 100644
--- a/source4/include/system/network.h
+++ b/source4/include/system/network.h
@@ -62,3 +62,19 @@
#define inet_ntoa rep_inet_ntoa
#endif
+/*
+ * glibc on linux doesn't seem to have MSG_WAITALL
+ * defined. I think the kernel has it though..
+ */
+#ifndef MSG_WAITALL
+#define MSG_WAITALL 0
+#endif
+
+/*
+ * Some older systems seem not to have MAXHOSTNAMELEN
+ * defined.
+ */
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 254
+#endif
+
diff --git a/source4/include/system/passwd.h b/source4/include/system/passwd.h
index ba7fc93d37..215f53d138 100644
--- a/source4/include/system/passwd.h
+++ b/source4/include/system/passwd.h
@@ -52,3 +52,15 @@
#include <compat.h>
#endif
+#ifdef REPLACE_GETPASS
+#define getpass(prompt) getsmbpass((prompt))
+#endif
+
+#ifndef HAVE_INITGROUPS
+int initgroups(char *name,gid_t id);
+#endif
+
+#ifndef HAVE_CRYPT
+#define crypt ufc_crypt
+#endif
+