Use Qt defined gettimeofday for VxWorks and no fallback to X11 version
VxWorks don't have gettimeofday function so we always use the one implemented in Qt. VxWorks DIAB compiler is not supported building Qt for VxWorks 6.9.2. Anyone using older VxWorks should also not be affected so use new defines VXWORKS_DKM and VXWORKS_RTP for VxWorks version 6.9.2 onward. Change-Id: I2e9546a101256ea0557b65163b40cd0f28be8519 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>bb10
parent
fb5bbea031
commit
7e3d5a7207
|
|
@ -92,7 +92,7 @@ int usleep(unsigned int usec)
|
|||
// gettimeofday() is declared, but is missing from the library
|
||||
// It IS however defined in the Curtis-Wright X11 libraries, so
|
||||
// we have to make the symbol 'weak'
|
||||
#if defined(Q_CC_DIAB)
|
||||
#if defined(Q_CC_DIAB) && !defined(VXWORKS_DKM) && !defined(VXWORKS_RTP)
|
||||
# pragma weak gettimeofday
|
||||
#endif
|
||||
int gettimeofday(struct timeval *tv, void /*struct timezone*/ *)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,11 @@
|
|||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#if defined(_WRS_KERNEL)
|
||||
#include <sys/times.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
|
|
@ -100,10 +104,14 @@ int rand_r(unsigned int * /*seedp*/);
|
|||
// no usleep() support
|
||||
int usleep(unsigned int);
|
||||
|
||||
#if defined(VXWORKS_DKM) || defined(VXWORKS_RTP)
|
||||
int gettimeofday(struct timeval *, void *);
|
||||
#else
|
||||
// gettimeofday() is declared, but is missing from the library.
|
||||
// It IS however defined in the Curtis-Wright X11 libraries, so
|
||||
// we have to make the symbol 'weak'
|
||||
int gettimeofday(struct timeval *tv, void /*struct timezone*/ *) __attribute__((weak));
|
||||
#endif
|
||||
|
||||
// neither getpagesize() or sysconf(_SC_PAGESIZE) are available
|
||||
int getpagesize();
|
||||
|
|
|
|||
Loading…
Reference in New Issue