summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2016-06-01 07:45:03 +0000
committered <ed@FreeBSD.org>2016-06-01 07:45:03 +0000
commit488642c8bc993686f479996ee3902aba46fc0a5f (patch)
tree056ea52ffc9f0485c4463291247c832f4eba3f12
parentf6411f5ef35d2017294619ca81841bd056d47798 (diff)
downloadFreeBSD-src-488642c8bc993686f479996ee3902aba46fc0a5f.zip
FreeBSD-src-488642c8bc993686f479996ee3902aba46fc0a5f.tar.gz
Define the id_t type as required by POSIX.
It seems that all versions of POSIX that I could find require that <sys/resource.h> defines id_t. Define it together with rlim_t. While there, move these typedefs closer to the top of the header file, right after the includes, which we do in most other header files.
-rw-r--r--sys/sys/resource.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/sys/resource.h b/sys/sys/resource.h
index ecdb02a..91b1141 100644
--- a/sys/sys/resource.h
+++ b/sys/sys/resource.h
@@ -37,6 +37,16 @@
#include <sys/_timeval.h>
#include <sys/_types.h>
+#ifndef _ID_T_DECLARED
+typedef __id_t id_t;
+#define _ID_T_DECLARED
+#endif
+
+#ifndef _RLIM_T_DECLARED
+typedef __rlim_t rlim_t;
+#define _RLIM_T_DECLARED
+#endif
+
/*
* Process priority specifications to get/setpriority.
*/
@@ -136,11 +146,6 @@ static const char *rlimit_ident[RLIM_NLIMITS] = {
};
#endif
-#ifndef _RLIM_T_DECLARED
-typedef __rlim_t rlim_t;
-#define _RLIM_T_DECLARED
-#endif
-
struct rlimit {
rlim_t rlim_cur; /* current (soft) limit */
rlim_t rlim_max; /* maximum value for rlim_cur */
OpenPOWER on IntegriCloud