Fix build on Integrity: the compiler doesn't understand this construct
"global/qrandom.cpp", line 155: error #2000-D: attribute "destructor" is not implemented and will be ignored Task-number: QTBUG-63948 Change-Id: Icaa86fc7b54d4b368c0efffd14efa35381d4e797 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
ae03f905d6
commit
82c787ec3b
@ -152,7 +152,11 @@ class SystemRandom
|
||||
{
|
||||
static QBasicAtomicInt s_fdp1; // "file descriptor plus 1"
|
||||
static int openDevice();
|
||||
static __attribute__((destructor)) void closeDevice(); // assume GCC or a compiler able to understand GCC extensions
|
||||
#ifdef Q_CC_GNU
|
||||
// If it's not GCC or GCC-like, then we'll leak the file descriptor
|
||||
__attribute__((destructor))
|
||||
#endif
|
||||
static void closeDevice();
|
||||
SystemRandom() {}
|
||||
public:
|
||||
enum { EfficientBufferFill = true };
|
||||
|
Loading…
Reference in New Issue
Block a user