auto import from //branches/cupcake/...@130745
diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h
index 5e6363f..23ab5ae 100644
--- a/libc/include/sys/stat.h
+++ b/libc/include/sys/stat.h
@@ -71,6 +71,10 @@
unsigned long long st_ino;
};
+extern int chmod(const char *, mode_t);
+extern int fchmod(int, mode_t);
+extern int mkdir(const char *, mode_t);
+
extern int stat(const char *, struct stat *);
extern int fstat(int, struct stat *);
extern int lstat(const char *, struct stat *);
diff --git a/libc/include/sys/time.h b/libc/include/sys/time.h
index 4dee4da..1f010d4 100644
--- a/libc/include/sys/time.h
+++ b/libc/include/sys/time.h
@@ -56,7 +56,7 @@
#define timeradd(a, b, res) \
do { \
(res)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
- (res)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
+ (res)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
if ((res)->tv_usec >= 1000000) { \
(res)->tv_usec -= 1000000; \
(res)->tv_sec += 1; \
diff --git a/libc/include/sys/types.h b/libc/include/sys/types.h
index 92b452c..b071ee9 100644
--- a/libc/include/sys/types.h
+++ b/libc/include/sys/types.h
@@ -65,6 +65,7 @@
#define _OFF_T_DEFINED_
typedef __kernel_off_t off_t;
typedef __kernel_loff_t loff_t;
+typedef loff_t off64_t; /* GLibc-specific */
typedef __kernel_pid_t pid_t;