[BACK]Return to patch-src_corelib_thread_qwaitcondition__unix.cpp CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / x11 / qt6-qtbase / patches

File: [cvs.NetBSD.org] / pkgsrc / x11 / qt6-qtbase / patches / patch-src_corelib_thread_qwaitcondition__unix.cpp (download)

Revision 1.1, Thu Nov 24 11:11:38 2022 UTC (2 months, 1 week ago) by nros
Branch: MAIN
CVS Tags: pkgsrc-2022Q4-base, pkgsrc-2022Q4, HEAD

Add qt6-qtbase version 6.4.1 to pkgsrc-current

Qt6-qtbase is version 6 of the qtbase package
of the Qt C++ GUI framework.
This commit also adds qt6 meta-package needed
for versioning and to be filled with more
packages.

$NetBSD: patch-src_corelib_thread_qwaitcondition__unix.cpp,v 1.1 2022/11/24 11:11:38 nros Exp $

On NetBSD before 6.1, do not use pthread_condattr_setclock().

--- src/corelib/thread/qwaitcondition_unix.cpp.orig	2018-12-03 11:15:26.000000000 +0000
+++ src/corelib/thread/qwaitcondition_unix.cpp
@@ -54,6 +54,7 @@
 
 #include <errno.h>
 #include <sys/time.h>
+#include <sys/param.h>
 #include <time.h>
 
 QT_BEGIN_NAMESPACE
@@ -84,7 +85,7 @@ void qt_initialize_pthread_cond(pthread_
 #if defined(Q_OS_ANDROID)
     if (local_condattr_setclock && QElapsedTimer::clockType() == QElapsedTimer::MonotonicClock)
         local_condattr_setclock(&condattr, CLOCK_MONOTONIC);
-#elif !defined(Q_OS_MAC)
+#elif !defined(Q_OS_MAC) && !(defined(Q_OS_NETBSD) && (__NetBSD_Version__ < 600010000))
     if (QElapsedTimer::clockType() == QElapsedTimer::MonotonicClock)
         pthread_condattr_setclock(&condattr, CLOCK_MONOTONIC);
 #endif