Skip to contentSkip to conversation

libsepol: require threads

PATCH Superseded Adam Duskett 2 participants 2 messages Oct 24, 2017

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 libsepol: require threads

libsepol 2.7 now uses pthreads.h

---
changes v1 -> v2:
- Added thread dependency to semodule-utils (Arnout)

 package/libsepol/Config.in       | 1 +
 package/semodule-utils/Config.in | 4 ++++
 2 files changed, 5 insertions(+)
package/libsepol/Config.in +1 -0
index f92af52072..83141e8b98 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBSEPOL
 	bool "libsepol"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
 	help
 	  Libsepol is the binary policy manipulation library. It doesn't
 	  depend upon or use any of the other SELinux components.
package/semodule-utils/Config.in +4 -0
index d9cb928c4c..995157baa1 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_SEMODULE_UTILS
 	bool "semodule-utils"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_LIBSEPOL
 	help
 	  semodule-utils is a package that contains tools for handling
@@ -13,3 +14,6 @@ config BR2_PACKAGE_SEMODULE_UTILS
 	  * semodule_package - Create a SELinux policy module package.
 
 	  https://github.com/SELinuxProject/selinux/wiki/Releases
+
+comment "semodule-utils needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
Signature · 1 line
2.13.6
#1 lore raw

PATCH v2 1/1 libsepol: require threads

Adam,

Quoted 27 lines · Adam Duskett

libsepol 2.7 now uses pthreads.h

---
changes v1 -> v2:
- Added thread dependency to semodule-utils (Arnout)

 package/libsepol/Config.in       | 1 +
 package/semodule-utils/Config.in | 4 ++++
 2 files changed, 5 insertions(+)
package/libsepol/Config.in +1 -0
index f92af52072..83141e8b98 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBSEPOL
        bool "libsepol"
+       depends on BR2_TOOLCHAIN_HAS_THREADS
        help
          Libsepol is the binary policy manipulation library. It doesn't
          depend upon or use any of the other SELinux components.
package/semodule-utils/Config.in +0 -0
index d9cb928c4c..995157baa1 100644

package/semodule-utils/Config.in line 3

Quoted 3 lines
package/semodule-utils/Config.in +1 -0
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_SEMODULE_UTILS
        bool "semodule-utils"
+       depends on BR2_TOOLCHAIN_HAS_THREADS

Suggest adding comment to show why the dependency was added. Something like

depends on BR2_TOOLCHAIN_HAS_THREADS # libsepol

package/semodule-utils/Config.in config BR2_PACKAGE_SEMODULE_UTILS · line 19

Quoted 10 lines
package/semodule-utils/Config.in +3 -0
        select BR2_PACKAGE_LIBSEPOL
        help
          semodule-utils is a package that contains tools for handling
@@ -13,3 +14,6 @@ config BR2_PACKAGE_SEMODULE_UTILS
          * semodule_package - Create a SELinux policy module package.
 
          https://github.com/SELinuxProject/selinux/wiki/Releases
+
+comment "semodule-utils needs a toolchain w/ threads"
+       depends on !BR2_TOOLCHAIN_HAS_THREADS

I'd suggest also doing similar for the libsepol package

Matt