diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-10-18 18:46:23 -0700 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-10-23 14:21:11 +0000 |
commit | 82c787ec3b0dc4ddc54639ad47eb82a052446858 (patch) | |
tree | fb4aa12af7c34ebf7353aaf3bd9caed7e988570c /src | |
parent | ae03f905d6ca3360659a0b20ea8d00bbfa342b91 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qrandom.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp index 3ae7e3bad8..0bbe79aeb4 100644 --- a/src/corelib/global/qrandom.cpp +++ b/src/corelib/global/qrandom.cpp @@ -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 }; |