summaryrefslogtreecommitdiffstats
path: root/build/has
diff options
context:
space:
mode:
Diffstat (limited to 'build/has')
-rw-r--r--build/has/_Fork.c (renamed from build/has/aligned-alloc.c)4
-rw-r--r--build/has/io-uring-max-workers.c11
-rw-r--r--build/has/tcgetwinsize.c9
-rw-r--r--build/has/timer-create.c9
4 files changed, 31 insertions, 2 deletions
diff --git a/build/has/aligned-alloc.c b/build/has/_Fork.c
index 4460038..4d7fbd3 100644
--- a/build/has/aligned-alloc.c
+++ b/build/has/_Fork.c
@@ -1,8 +1,8 @@
// Copyright © Tavian Barnes <tavianator@tavianator.com>
// SPDX-License-Identifier: 0BSD
-#include <stdlib.h>
+#include <unistd.h>
int main(void) {
- return !aligned_alloc(_Alignof(void *), sizeof(void *));
+ return _Fork();
}
diff --git a/build/has/io-uring-max-workers.c b/build/has/io-uring-max-workers.c
new file mode 100644
index 0000000..34ab5b7
--- /dev/null
+++ b/build/has/io-uring-max-workers.c
@@ -0,0 +1,11 @@
+// Copyright © Tavian Barnes <tavianator@tavianator.com>
+// SPDX-License-Identifier: 0BSD
+
+#include <liburing.h>
+
+int main(void) {
+ struct io_uring ring;
+ io_uring_queue_init(1, &ring, 0);
+ unsigned int values[] = {0, 0};
+ return io_uring_register_iowq_max_workers(&ring, values);
+}
diff --git a/build/has/tcgetwinsize.c b/build/has/tcgetwinsize.c
new file mode 100644
index 0000000..d25d12b
--- /dev/null
+++ b/build/has/tcgetwinsize.c
@@ -0,0 +1,9 @@
+// Copyright © Tavian Barnes <tavianator@tavianator.com>
+// SPDX-License-Identifier: 0BSD
+
+#include <termios.h>
+
+int main(void) {
+ struct winsize ws;
+ return tcgetwinsize(0, &ws);
+}
diff --git a/build/has/timer-create.c b/build/has/timer-create.c
new file mode 100644
index 0000000..d5354c3
--- /dev/null
+++ b/build/has/timer-create.c
@@ -0,0 +1,9 @@
+// Copyright © Tavian Barnes <tavianator@tavianator.com>
+// SPDX-License-Identifier: 0BSD
+
+#include <time.h>
+
+int main(void) {
+ timer_t timer;
+ return timer_create(CLOCK_REALTIME, NULL, &timer);
+}