<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From 64ceb44576e2d4da20dc81754b1b0635aca7392b Mon Sep 17 00:00:00 2001
From: Sergey Fedorov &lt;barracuda@macos-powerpc.org&gt;
Date: Wed, 27 Nov 2024 10:00:04 +0800
Subject: [PATCH] os-wrappers-test: F_DUPFD_CLOEXEC may not be defined

---
 tests/os-wrappers-test.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/os-wrappers-test.c b/tests/os-wrappers-test.c
index 5021859..4efb0ac 100644
--- a/tests/os-wrappers-test.c
+++ b/tests/os-wrappers-test.c
@@ -119,12 +119,16 @@ __attribute__ ((visibility("default"))) int
 
 	wrapped_calls_fcntl++;
 
+#ifdef F_DUPFD_CLOEXEC
 	if (fall_back &amp;&amp; (cmd == F_DUPFD_CLOEXEC)) {
 		errno = EINVAL;
 		return -1;
 	}
+#endif
 	switch (cmd) {
+#ifdef F_DUPFD_CLOEXEC
 	case F_DUPFD_CLOEXEC:
+#endif
 	case F_DUPFD:
 	case F_SETFD:
 		va_start(ap, cmd);
</pre></body></html>