<!DOCTYPE html>
<html data-lt-installed="true">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body style="padding-bottom: 1px;">
    <p>Hi, Sergey</p>
    <p>thanks for the fix, LGTM</p>
    <p>Sergey<br>
    </p>
    <div class="moz-cite-prefix">On 29.10.2024 11:42, Sergey Kaplun
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20241029084258.6881-1-skaplun@tarantool.org">
      <pre class="moz-quote-pre" wrap="">When building <tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c> on
macOS Sequoia 15.0, I've got the following error from including
<sys/ptrace.h>:

| error: unknown type name 'caddr_t'
| int     ptrace(int _request, pid_t _pid, caddr_t _addr, int _data);

It can be fixed by including <sys/types.h>, but since this test is
skipped for macOS anyway, I prefer just to move all necessary includes
under the corresponding define.
---

Branch: <a class="moz-txt-link-freetext" href="https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-macos-c-tests">https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-macos-c-tests</a>

 .../gh-8594-sysprof-ffunc-crash.test.c               | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c b/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c
index cf1d815a..4067ba1d 100644
--- a/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c
+++ b/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c
@@ -5,12 +5,6 @@
 #include "test.h"
 #include "utils.h"
 
-#include <signal.h>
-#include <sys/ptrace.h>
-#include <sys/user.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
 /* XXX: Still need normal assert inside <tracee> and helpers. */
 #undef NDEBUG
 #include <assert.h>
@@ -24,6 +18,12 @@
 
 #if LUAJIT_OS == LUAJIT_OS_LINUX && LUAJIT_TARGET == LUAJIT_ARCH_X64
 
+#include <signal.h>
+#include <sys/ptrace.h>
+#include <sys/user.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
 /*
  * XXX: The test makes sysprof collect the particular event
  * (FFUNC) at the particular instruction (<lj_fff_res1>) to
</pre>
    </blockquote>
  </body>
  <lt-container></lt-container>
</html>