re-add useconds_t
[musl] / include / sys / types.h
index 72b4c5c..6ead8b6 100644 (file)
@@ -4,6 +4,8 @@
 extern "C" {
 #endif
 
+#include <features.h>
+
 #define __NEED_ino_t
 #define __NEED_dev_t
 #define __NEED_uid_t
@@ -50,6 +52,7 @@ extern "C" {
 #define __NEED_pthread_spinlock_t
 #define __NEED_pthread_key_t
 #define __NEED_pthread_once_t
+#define __NEED_useconds_t
 
 #include <bits/alltypes.h>
 
@@ -58,8 +61,8 @@ typedef __uint16_t u_int16_t;
 typedef __uint32_t u_int32_t;
 typedef __uint64_t u_int64_t;
 
-#ifdef _GNU_SOURCE
-typedef unsigned long caddr_t;
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+typedef char *caddr_t;
 typedef unsigned char u_char;
 typedef unsigned short u_short, ushort;
 typedef unsigned u_int, uint;
@@ -72,6 +75,15 @@ typedef long register_t;
 #include <sys/sysmacros.h>
 #endif
 
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
+#define blksize64_t blksize_t
+#define blkcnt64_t blkcnt_t
+#define fsblkcnt64_t fsblkcnt_t
+#define fsfilcnt64_t fsfilcnt_t
+#define ino64_t ino_t
+#define off64_t off_t
+#endif
+
 #ifdef __cplusplus
 }
 #endif