mlibc: Declare chmod.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 29 Apr 2018 10:01:25 +0000 (12:01 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 29 Apr 2018 10:01:25 +0000 (12:01 +0200)
* include/sys/stat.h (mode_t, chmod): Declare.

include/sys/stat.h

index 0cb770bb69e8060998b28f29e294259760e1def8..8513a3c9686a7c4c78a920bedb8b656966e7497d 100644 (file)
 #if __GNUC__ && POSIX
 #undef __MES_SYS_STAT_H
 #include_next <sys/stat.h>
-#endif // (__GNUC__ && POSIX)
+
+#else // !(__GNUC__ && POSIX)
+
+#ifndef __MES_MODE_T
+#define __MES_MODE_T
+typedef int mode_t;
+#endif
+
+int chmod (char const *file_name, mode_t mode);
 
 struct stat {
   int st_dev;
@@ -41,5 +49,7 @@ struct stat {
   int st_ctime;
 };
 
+#endif // !(__GNUC__ && POSIX)
+
 #endif // __MES_SYS_STAT_H