summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.py5
-rw-r--r--src/disk_interface.cc2
2 files changed, 7 insertions, 0 deletions
diff --git a/configure.py b/configure.py
index 9e23a5a..5841f8d 100755
--- a/configure.py
+++ b/configure.py
@@ -356,6 +356,11 @@ else:
if platform.uses_usr_local():
cflags.append('-I/usr/local/include')
ldflags.append('-L/usr/local/lib')
+ if platform.is_aix():
+ # printf formats for int64_t, uint64_t; large file support
+ cflags.append('-D__STDC_FORMAT_MACROS')
+ cflags.append('-D_LARGE_FILES')
+
libs = []
diff --git a/src/disk_interface.cc b/src/disk_interface.cc
index 7eb44b2..7351715 100644
--- a/src/disk_interface.cc
+++ b/src/disk_interface.cc
@@ -212,6 +212,8 @@ TimeStamp RealDiskInterface::Stat(const string& path, string* err) const {
// For bionic, C and POSIX API is always enabled.
// For solaris, see https://docs.oracle.com/cd/E88353_01/html/E37841/stat-2.html.
return (int64_t)st.st_mtim.tv_sec * 1000000000LL + st.st_mtim.tv_nsec;
+#elif defined(_AIX)
+ return (int64_t)st.st_mtime * 1000000000LL + st.st_mtime_n;
#else
return (int64_t)st.st_mtime * 1000000000LL + st.st_mtimensec;
#endif