summaryrefslogtreecommitdiff
path: root/include/sys
diff options
context:
space:
mode:
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/cdefs.h16
-rw-r--r--include/sys/select.h3
-rw-r--r--include/sys/wait.h4
3 files changed, 14 insertions, 9 deletions
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
index c3bb51c1..0d6f6327 100644
--- a/include/sys/cdefs.h
+++ b/include/sys/cdefs.h
@@ -4,16 +4,16 @@
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS }
-#define __dead __attribute__((__noreturn__))
-
-#define __used __attribute__((__used__))
-#define __unused __attribute__((__unused__))
-
+#define __dead __attribute__((__noreturn__))
+#define __used __attribute__((__used__))
+#define __unused __attribute__((__unused__))
#define __packed __attribute__((__packed__))
#define __aligned(x) __attribute__((__aligned__(x)))
+#define __malloc __attribute__((__malloc__))
+#define __pure __attribute__((__pure__))
+#define __nodiscard __attribute__((__warn_unused_result__))
-#define __malloc __attribute__((__malloc__))
-
-#define __pure __attribute__((__pure__))
+#define __predict_true(exp) __builtin_expect((exp) != 0, 1)
+#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
#endif
diff --git a/include/sys/select.h b/include/sys/select.h
index 13c48dda..16b391d1 100644
--- a/include/sys/select.h
+++ b/include/sys/select.h
@@ -7,6 +7,9 @@
#define __BITS_TIMESPEC_H_
#include <bits/timespec.h>
+struct timespec;
+struct timeval;
+
typedef __UINT64_TYPE__ sigset_t;
int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
diff --git a/include/sys/wait.h b/include/sys/wait.h
index ad935dc8..1325885e 100644
--- a/include/sys/wait.h
+++ b/include/sys/wait.h
@@ -2,7 +2,9 @@
#define __WAIT_H
#define __BITS_WAIT_H_
-#include <bits/wait.h>
+#include <bits/wait.h> // for WUNTRACED
+#include <signal.h> // for siginfo_t
+#include <sys/types.h> // for pid_t, id_t
#define __BITS_SIGINFO_H_
#include <bits/siginfo.h>