diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-11-10 10:48:11 +0100 |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-11-10 10:48:11 +0100 |
commit | d845505fd57ad4b06499b5b125703e80bbae692a (patch) | |
tree | 90f7f0d55eec7754fe870a62b117ac8be6e250d1 /config.tests/x11 | |
parent | 327ef9127aba3aa6bf2238c0aa779613f8edf0b1 (diff) | |
download | qt4-tools-d845505fd57ad4b06499b5b125703e80bbae692a.tar.gz |
Avoid XSync-related runtime crashes on HP-UX due to C++ mangling.
HP-UX is missing the extern "C" wrapper for its XSync function
declarations. This caused applications to _build_ but not _run_ (i.e.,
all GUI apps crashed). Adding the wrapper should be harmless on all
X11 platforms.
Task-number: QTBUG-5524
Reviewed-by: Thiago
Diffstat (limited to 'config.tests/x11')
-rw-r--r-- | config.tests/x11/xsync/xsync.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config.tests/x11/xsync/xsync.cpp b/config.tests/x11/xsync/xsync.cpp index a7175deb76..8eea8508c1 100644 --- a/config.tests/x11/xsync/xsync.cpp +++ b/config.tests/x11/xsync/xsync.cpp @@ -41,12 +41,16 @@ #include <X11/Xlib.h> #include <X11/Xutil.h> +extern "C" { #include <X11/extensions/sync.h> +} int main(int, char **) { XSyncValue value; (void*)&XSyncIntToValue; (void*)&XSyncCreateCounter; - return 0; + int a, b; + Status ret = XSyncInitialize(NULL, &a, &b); + return ret; } |