aboutsummaryrefslogtreecommitdiff
path: root/system/include/libc/sys
diff options
context:
space:
mode:
Diffstat (limited to 'system/include/libc/sys')
-rw-r--r--system/include/libc/sys/_default_fcntl.h5
-rw-r--r--system/include/libc/sys/dirent.h4
-rw-r--r--system/include/libc/sys/types.h11
3 files changed, 11 insertions, 9 deletions
diff --git a/system/include/libc/sys/_default_fcntl.h b/system/include/libc/sys/_default_fcntl.h
index 0f2ffb07..188e25c4 100644
--- a/system/include/libc/sys/_default_fcntl.h
+++ b/system/include/libc/sys/_default_fcntl.h
@@ -209,6 +209,11 @@ extern int _open64 _PARAMS ((const char *, int, ...));
#define POSIX_FADV_DONTNEED 135
int posix_fadvise(int fd, off_t offset, off_t len, int advice);
int posix_fallocate(int fd, off_t offset, off_t len);
+#define LOCK_SH 1
+#define LOCK_EX 2
+#define LOCK_UN 4
+#define LOCK_NB 8
+int flock(int fd, int operation);
#ifdef __cplusplus
}
diff --git a/system/include/libc/sys/dirent.h b/system/include/libc/sys/dirent.h
index 1fbe2b21..9dcf34d1 100644
--- a/system/include/libc/sys/dirent.h
+++ b/system/include/libc/sys/dirent.h
@@ -26,6 +26,10 @@ long telldir(DIR *);
DIR *readdir(DIR *);
int closedir(DIR *dirp);
void rewinddir(DIR *dirp);
+int scandir(const char *dirp,
+ struct dirent ***namelist,
+ int (*filter)(const struct dirent *),
+ int (*compar)(const struct dirent **, const struct dirent **));
enum {
DT_UNKNOWN = 0,
diff --git a/system/include/libc/sys/types.h b/system/include/libc/sys/types.h
index 79506f3a..2f887537 100644
--- a/system/include/libc/sys/types.h
+++ b/system/include/libc/sys/types.h
@@ -140,15 +140,8 @@ typedef unsigned long vm_size_t;
#define __BIT_TYPES_DEFINED__
-typedef signed char int8_t;
-typedef unsigned char u_int8_t;
-typedef short int16_t;
-typedef unsigned short u_int16_t;
-typedef int int32_t;
-typedef unsigned int u_int32_t;
-typedef long long int64_t;
-typedef unsigned long long u_int64_t;
-typedef int32_t register_t;
+// XXX Emscripten: removed types which are already defined, get them from stdint
+#include <stdint.h>
#endif /* __MS_types__ */
/*