mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix QNX build.
Note: this is not an officially supported target. Contributed by Wen Yang.
This commit is contained in:
parent
03080b795a
commit
e19db60512
@ -93,6 +93,9 @@
|
||||
#elif defined(__CYGWIN__)
|
||||
#define LJ_TARGET_CYGWIN 1
|
||||
#define LUAJIT_OS LUAJIT_OS_POSIX
|
||||
#elif defined(__QNX__)
|
||||
#define LJ_TARGET_QNX 1
|
||||
#define LUAJIT_OS LUAJIT_OS_POSIX
|
||||
#else
|
||||
#define LUAJIT_OS LUAJIT_OS_OTHER
|
||||
#endif
|
||||
|
@ -125,7 +125,7 @@ static PRGR libfunc_rgr;
|
||||
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
|
||||
#define LJ_TARGET_HAS_GETENTROPY 1
|
||||
#endif
|
||||
#elif (LJ_TARGET_BSD && !defined(__NetBSD__)) || LJ_TARGET_SOLARIS || LJ_TARGET_CYGWIN
|
||||
#elif (LJ_TARGET_BSD && !defined(__NetBSD__)) || LJ_TARGET_SOLARIS || LJ_TARGET_CYGWIN || LJ_TARGET_QNX
|
||||
#define LJ_TARGET_HAS_GETENTROPY 1
|
||||
#endif
|
||||
|
||||
|
@ -185,7 +185,11 @@ static void profile_timer_start(ProfileState *ps)
|
||||
tm.it_value.tv_sec = tm.it_interval.tv_sec = interval / 1000;
|
||||
tm.it_value.tv_usec = tm.it_interval.tv_usec = (interval % 1000) * 1000;
|
||||
setitimer(ITIMER_PROF, &tm, NULL);
|
||||
#if LJ_TARGET_QNX
|
||||
sa.sa_flags = 0;
|
||||
#else
|
||||
sa.sa_flags = SA_RESTART;
|
||||
#endif
|
||||
sa.sa_handler = profile_signal;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sigaction(SIGPROF, &sa, &ps->oldsa);
|
||||
|
Loading…
Reference in New Issue
Block a user