summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/build/m4/rewrite.m42
-rw-r--r--source4/lib/replace.c12
2 files changed, 13 insertions, 1 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
index b6ced8db97..10eb025876 100644
--- a/source4/build/m4/rewrite.m4
+++ b/source4/build/m4/rewrite.m4
@@ -404,7 +404,7 @@ if test x"$ac_cv_func_execl" = x"no"; then
EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
fi
-AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
+AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strtoull strtouq strerror chown fchown chmod fchmod chroot link mknod mknod64)
AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid)
AC_CHECK_FUNCS(memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid)
AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent)
diff --git a/source4/lib/replace.c b/source4/lib/replace.c
index de32d377d5..64234f7042 100644
--- a/source4/lib/replace.c
+++ b/source4/lib/replace.c
@@ -468,3 +468,15 @@ char *rep_inet_ntoa(struct in_addr ip)
return ret;
}
#endif
+
+
+#ifndef HAVE_STRTOULL
+ unsigned long long int strtoull(const char *str, char **endptr, int base)
+{
+#ifdef HAVE_STRTOUQ
+ return strtouq(str, endptr, base);
+#else
+#error "system must support 64 bit integer read from strings"
+#endif
+}
+#endif