[Buildroot] [git commit branch/2025.02.x] package/libcap-ng: disable pthread support on nommu

Titouan Christophe titouan.christophe at mind.be
Thu Sep 4 11:57:24 UTC 2025


commit: https://git.buildroot.net/buildroot/commit/?id=427fbd3af6082adaddf33576c606f439b93cce13
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2025.02.x

Fixes: https://autobuild.buildroot.net/results/9c40c86a42882a6d56eb6d6d1418781a980b6f8f/

The pthread support uses pthread_atfork(), which is not available on nommu:

cap-ng.c: In function 'init_lib':
cap-ng.c:225:9: error: implicit declaration of function 'pthread_atfork';
  did you mean 'pthread_join'?  [-Wimplicit-function-declaration]

So disable pthread support on nommu to fix that.

Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
Signed-off-by: Arnout Vandecappelle <arnout at rnout.be>
(cherry picked from commit 59fe7547a495ffbaa817fd57e13c8741acfe1248)
Signed-off-by: Titouan Christophe <titouan.christophe at mind.be>
---
 package/libcap-ng/libcap-ng.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/libcap-ng/libcap-ng.mk b/package/libcap-ng/libcap-ng.mk
index 9c8012b238..e544e27696 100644
--- a/package/libcap-ng/libcap-ng.mk
+++ b/package/libcap-ng/libcap-ng.mk
@@ -14,6 +14,11 @@ LIBCAP_NG_INSTALL_STAGING = YES
 LIBCAP_NG_CONF_ENV = ac_cv_prog_swig_found=no
 LIBCAP_NG_CONF_OPTS = --without-python3
 
+# pthread support uses pthread_atfork, which is not available on nommu
+ifneq ($(BR2_USE_MMU),y)
+LIBCAP_NG_CONF_ENV += ac_cv_header_pthread_h=no
+endif
+
 HOST_LIBCAP_NG_CONF_ENV = ac_cv_prog_swig_found=no
 HOST_LIBCAP_NG_CONF_OPTS = --without-python3
 


More information about the buildroot mailing list