| Summary: | FreeBSD 12: dependencies/tqt3 fails to build | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Nikolaus Klepp <office> |
| Component: | other (any) | Assignee: | Timothy Pearson <kb9vqf> |
| Status: | RESOLVED FIXED | ||
| Severity: | blocker | CC: | bugwatch, michele.calgaro, slavek.banko |
| Priority: | P5 | ||
| Version: | R14.0.x [Trinity] | ||
| Hardware: | All | ||
| OS: | Other | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Bug Depends on: | |||
| Bug Blocks: | 2885 | ||
| Attachments: | Patch for FreeBSD 12 | ||
Hi Nik, to provide patches and simplify sharing and authorship recognition, we would like to invite you to join TGW and create a pull request there, if you don't mind :-) TGW https://mirror.git.trinitydesktop.org/gitea/ TGW guide https://wiki.trinitydesktop.org/TDE_Gitea_Workspace The proposed solution is not good. We need to include sys/sem.h in any case. It is not possible to move it inside the condition as is in your proposed patch.
It seems that a simpler solution is use your proposed #define _WANT_SEMUN but place it before include sys/sem.h in its original location. On systems that do not use the definition of _WANT_SEMUN, its definition will not bother. While on the systems that use this definition, it will provide the necessary result.
--- a/src/kernel/qlock.cpp
+++ b/src/kernel/qlock.cpp
@@ -47,6 +47,7 @@
#include <sys/stat.h>
#include <sys/file.h>
#else
+#define _WANT_SEMUN
#include <sys/sem.h>
#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) \
|| defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_BSDI)
Fixed in commits b7be699a09 (master) and 07eabff779 (r14.0.x). |
Created attachment 2910 [details] Patch for FreeBSD 12 On FreeBSD 12 the union "semun" included from <sys/sem.h> is only available when _WANT_SEMUN is defined. If _WANT_SEMUN is not defined, compilation fails. The attached patch fixes that.