summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatt Kraai <mkraai@beckman.com>2009-07-09 09:45:28 -0700
committerJelmer Vernooij <jelmer@samba.org>2009-07-19 15:59:03 +0200
commitdbedfc318e2984238ee0acdb19a1a70fda8f4381 (patch)
tree5b037490f55044938e699774ec5d01c6c1796861 /lib
parent5b4cb31ef1359d8c39dbffc028abb68652cc2186 (diff)
downloadsamba-dbedfc318e2984238ee0acdb19a1a70fda8f4381.tar.gz
samba-dbedfc318e2984238ee0acdb19a1a70fda8f4381.tar.bz2
samba-dbedfc318e2984238ee0acdb19a1a70fda8f4381.zip
include unix.h if it's available
Diffstat (limited to 'lib')
-rw-r--r--lib/replace/libreplace.m41
-rw-r--r--lib/replace/replace.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4
index 2d90d9c7e8..a3a26ef43e 100644
--- a/lib/replace/libreplace.m4
+++ b/lib/replace/libreplace.m4
@@ -103,6 +103,7 @@ AC_CHECK_HEADERS(sys/time.h time.h)
AC_CHECK_HEADERS(stdarg.h vararg.h)
AC_CHECK_HEADERS(sys/mount.h mntent.h)
AC_CHECK_HEADERS(stropts.h)
+AC_CHECK_HEADERS(unix.h)
AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index fe1f732acb..2db6aa1226 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -258,6 +258,10 @@ char *rep_realpath(const char *path, char *resolved_path);
int rep_lchown(const char *fname,uid_t uid,gid_t gid);
#endif
+#ifdef HAVE_UNIX_H
+#include <unix.h>
+#endif
+
#ifndef HAVE_SETLINEBUF
#define setlinebuf rep_setlinebuf
void rep_setlinebuf(FILE *);