From 8840ad56a3afb185b4e0b9158130d6e265161f4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Mon, 11 Feb 2013 16:11:27 +0200 Subject: Use stub function rand_r for VxWorks DKM mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vxworks DKM mode does not have rand_r function, use function implementation from qfunctions_vxworks.h/cpp instead. Change-Id: I8f23c3453ab9f31280eb90f66dd83d7a64ee98c9 Reviewed-by: Samuel Rødal --- src/corelib/kernel/qfunctions_vxworks.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/corelib/kernel/qfunctions_vxworks.cpp') diff --git a/src/corelib/kernel/qfunctions_vxworks.cpp b/src/corelib/kernel/qfunctions_vxworks.cpp index 8d25ad6a8d..e1abecb9d6 100644 --- a/src/corelib/kernel/qfunctions_vxworks.cpp +++ b/src/corelib/kernel/qfunctions_vxworks.cpp @@ -76,10 +76,12 @@ void *lfind(const void* key, const void* base, size_t* elements, size_t size, // no rand_r(), but rand() // NOTE: this implementation is wrong for multi threaded applications, // but there is no way to get it right on VxWorks (in kernel mode) +#if defined(_WRS_KERNEL) int rand_r(unsigned int * /*seedp*/) { return rand(); } +#endif // no usleep() support int usleep(unsigned int usec) -- cgit v1.2.3