mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
check for pthread_stackseg_np() during build
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
5b908937b5
commit
b7376b2e53
3 changed files with 4 additions and 3 deletions
|
@ -389,6 +389,7 @@ katie_check_function(fesetenv "fenv.h")
|
|||
katie_check_function(feclearexcept "fenv.h")
|
||||
katie_check_function(feenableexcept "fenv.h")
|
||||
# none
|
||||
katie_check_function(pthread_stackseg_np "pthread_np.h" "${CMAKE_THREAD_LIBS_INIT}")
|
||||
katie_check_function(madvise "sys/mman.h")
|
||||
katie_check_function(getifaddrs "ifaddrs.h")
|
||||
katie_check_struct(sockaddr_ll sll_addr "netpacket/packet.h")
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_OPENBSD) || defined(QT_HAVE_PTHREAD_ATTR_GET_NP)
|
||||
#if defined(QT_HAVE_PTHREAD_STACKSEG_NP) || defined(QT_HAVE_PTHREAD_ATTR_GET_NP)
|
||||
#include <pthread_np.h>
|
||||
#endif
|
||||
|
||||
|
@ -335,7 +335,7 @@ static inline void* currentThreadStackBase()
|
|||
stack_t s;
|
||||
thr_stksegment(&s);
|
||||
return s.ss_sp;
|
||||
#elif defined(Q_OS_OPENBSD)
|
||||
#elif defined(QT_HAVE_PTHREAD_STACKSEG_NP)
|
||||
pthread_t thread = pthread_self();
|
||||
stack_t stack;
|
||||
pthread_stackseg_np(thread, &stack);
|
||||
|
|
|
@ -1525,7 +1525,7 @@ void qsrand(uint seed)
|
|||
*/
|
||||
int qrand()
|
||||
{
|
||||
#if defined(QT_HAVE_ARC4RANDOM)
|
||||
#ifdef QT_HAVE_ARC4RANDOM
|
||||
return ::arc4random();
|
||||
#else
|
||||
// Seed the PRNG once per thread with a combination of current time and its address
|
||||
|
|
Loading…
Add table
Reference in a new issue