Skip to content

Commit

Permalink
test: fix build for macOS Sequoia 15.0
Browse files Browse the repository at this point in the history
When build <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.
  • Loading branch information
Buristan committed Oct 25, 2024
1 parent b52fe97 commit 4dcccda
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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
Expand Down

0 comments on commit 4dcccda

Please sign in to comment.