summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-04-01 01:14:23 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-04-01 01:14:23 +0000
commita30e19da564deda466e3fe79784f51d2fc6adb51 (patch)
tree542594ba6d7ac07a0af0229bcd473d8a325dc699
parenteaf50be332f015bd90e45d4f9d111b24cd230f00 (diff)
parent1f1a51aecd7c825418bfedcb66772e92de790149 (diff)
Merge "Add a few missing types and constants to headers."
-rw-r--r--libc/include/mntent.h10
-rw-r--r--libc/include/sys/param.h2
-rw-r--r--libc/include/sys/stat.h6
-rw-r--r--libc/include/sys/types.h2
4 files changed, 20 insertions, 0 deletions
diff --git a/libc/include/mntent.h b/libc/include/mntent.h
index a190aeb3c..dbade0c71 100644
--- a/libc/include/mntent.h
+++ b/libc/include/mntent.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _MNTENT_H_
#define _MNTENT_H_
@@ -33,7 +34,16 @@
#include <paths.h> /* for _PATH_MOUNTED */
#define MOUNTED _PATH_MOUNTED
+
+#define MNTTYPE_DEFAULTS "defaults"
#define MNTTYPE_IGNORE "ignore"
+#define MNTTYPE_NFS "nfs"
+#define MNTTYPE_NOAUTO "noauto"
+#define MNTTYPE_NOSUID "nosuid"
+#define MNTTYPE_RO "ro"
+#define MNTTYPE_RW "rw"
+#define MNTTYPE_SUID "suid"
+#define MNTTYPE_SWAP "swap"
struct mntent {
char* mnt_fsname;
diff --git a/libc/include/sys/param.h b/libc/include/sys/param.h
index e64d6ce3c..5d2248f76 100644
--- a/libc/include/sys/param.h
+++ b/libc/include/sys/param.h
@@ -31,6 +31,8 @@
#include <limits.h>
#include <linux/param.h>
+#define DEV_BSIZE 512
+
#define MAXPATHLEN PATH_MAX
#define MAXSYMLINKS 8
diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h
index 257ded06d..86668f628 100644
--- a/libc/include/sys/stat.h
+++ b/libc/include/sys/stat.h
@@ -135,6 +135,12 @@ struct stat64 { __STAT64_BODY };
#define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) /* 0666 */
#endif
+#if defined(__USE_BSD) || defined(__USE_GNU)
+#define S_IREAD S_IRUSR
+#define S_IWRITE S_IWUSR
+#define S_IEXEC S_IXUSR
+#endif
+
extern int chmod(const char*, mode_t);
extern int fchmod(int, mode_t);
extern int mkdir(const char*, mode_t);
diff --git a/libc/include/sys/types.h b/libc/include/sys/types.h
index 217fd603b..a42226156 100644
--- a/libc/include/sys/types.h
+++ b/libc/include/sys/types.h
@@ -66,6 +66,8 @@ typedef __key_t key_t;
typedef __kernel_ino_t __ino_t;
typedef __ino_t ino_t;
+typedef uint64_t ino64_t;
+
typedef uint32_t __nlink_t;
typedef __nlink_t nlink_t;