summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/build/m4/rewrite.m42
-rw-r--r--source4/dsdb/samdb/samdb.c4
-rw-r--r--source4/include/includes.h4
3 files changed, 7 insertions, 3 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
index 35482b6cec..fd19de5d17 100644
--- a/source4/build/m4/rewrite.m4
+++ b/source4/build/m4/rewrite.m4
@@ -63,7 +63,7 @@ AC_CHECK_HEADERS(sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
AC_CHECK_HEADERS(fnmatch.h pwd.h sys/termio.h sys/time.h sys/statfs.h sys/statvfs.h stdarg.h sys/sockio.h)
AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h dlfcn.h)
AC_CHECK_HEADERS(sys/syslog.h syslog.h)
-AC_CHECK_HEADERS(stdint.h locale.h)
+AC_CHECK_HEADERS(stdint.h inttypes.h locale.h)
AC_CHECK_HEADERS(shadow.h netdb.h netinet/in.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
AC_CHECK_HEADERS(nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h)
AC_CHECK_HEADERS(sys/capability.h syscall.h sys/syscall.h)
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index 448e4292aa..7811ca1965 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -852,7 +852,7 @@ int samdb_msg_add_uint(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct
int samdb_msg_add_int64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
const char *attr_name, int64_t v)
{
- const char *s = talloc_asprintf(mem_ctx, "%lld", v);
+ const char *s = talloc_asprintf(mem_ctx, "%PRIi64", v);
return samdb_msg_add_string(sam_ldb, mem_ctx, msg, attr_name, s);
}
@@ -862,7 +862,7 @@ int samdb_msg_add_int64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct
int samdb_msg_add_uint64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
const char *attr_name, uint64_t v)
{
- const char *s = talloc_asprintf(mem_ctx, "%llu", v);
+ const char *s = talloc_asprintf(mem_ctx, "%PRIu64", v);
return samdb_msg_add_string(sam_ldb, mem_ctx, msg, attr_name, s);
}
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 88ee4af3b0..58799d9b86 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -47,6 +47,10 @@
#include <stdint.h>
#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
#ifdef HAVE_STRING_H
#include <string.h>
#endif