From 9ede07613dc5b7759f398d5a8839b2ffdb4675a2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 28 Jan 2020 16:59:59 -0800 Subject: QLockFile: Disable flock() on QNX It appears it's not implemented. [ChangeLog][QtCore][QLockFile] Suppressed the warning on QNX that said 'setNativeLocks failed: "Function not implemented"'. There is no difference in behavior: Qt will continue not to be able to apply an OS- level file lock, which means the lock could be accidentally stolen by buggy software. Correct software using QLockFile should not be affected. Fixes: QTBUG-81701 Change-Id: If79a52e476594446baccfffd15ee35bbac6c6e47 Reviewed-by: David Faure --- src/corelib/io/qlockfile_unix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib') diff --git a/src/corelib/io/qlockfile_unix.cpp b/src/corelib/io/qlockfile_unix.cpp index b2bf77c0da..ce2b7e8faa 100644 --- a/src/corelib/io/qlockfile_unix.cpp +++ b/src/corelib/io/qlockfile_unix.cpp @@ -58,7 +58,8 @@ #include // flock #endif -#if defined(Q_OS_RTEMS) +#if defined(Q_OS_RTEMS) || defined(Q_OS_QNX) +// flock() does not work in these OSes and produce warnings when we try to use # undef LOCK_EX # undef LOCK_NB #endif -- cgit v1.2.3