By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 2991

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

Description Nikolaus Klepp 2018-12-17 16:29:56 CST
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.
Comment 1 Michele Calgaro 2018-12-18 05:59:03 CST
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
Comment 2 Slávek Banko 2019-02-16 06:28:14 CST
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)
Comment 3 Slávek Banko 2019-02-16 12:33:52 CST
Fixed in commits b7be699a09 (master) and 07eabff779 (r14.0.x).