refactor headers, especially alltypes.h, and improve C++ ABI compat
[musl] / include / sys / resource.h
index cb39923..0cfbcf4 100644 (file)
@@ -5,9 +5,10 @@
 extern "C" {
 #endif
 
+#include <features.h>
+#include <sys/time.h>
+
 #define __NEED_id_t
-#define __NEED_time_t
-#define __NEED_struct_timeval
 
 #ifdef _GNU_SOURCE
 #define __NEED_pid_t
@@ -55,6 +56,7 @@ int setpriority (int, id_t, int);
 
 #ifdef _GNU_SOURCE
 int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
+#define prlimit64 prlimit
 #endif
 
 #define PRIO_PROCESS 0
@@ -87,6 +89,12 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
 
 #define RLIM_NLIMITS RLIMIT_NLIMITS
 
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
+#define getrlimit64 getrlimit
+#define setrlimit64 setrlimit
+#define rlimit64 rlimit
+#define rlim64_t rlim_t
+#endif
 
 #ifdef __cplusplus
 }