summaryrefslogtreecommitdiffhomepage
path: root/auto
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2024-12-19 23:51:59 +0000
committerKonstantin Pavlov <pavlov.konstantin@gmail.com>2025-01-10 13:01:46 -0800
commit78489c9d2bcc9a124d942fdfb5530fc377417b9e (patch)
tree53484f3c9af85a537480afc5de3f740c96646e9b /auto
parentc4892fff93841844ed78f85f723d1b383d9f0b38 (diff)
downloadunit-78489c9d2bcc9a124d942fdfb5530fc377417b9e.tar.gz
unit-78489c9d2bcc9a124d942fdfb5530fc377417b9e.tar.bz2
auto/otel: Make use of nxt_feature_name
When building with --otel on macOS for example I was seeing compile failures with the cpu_set_t stuff which should only be used under Linux. It turned out that despite checking for Linux sched_getaffinity() ... not found we were getting #ifndef NXT_HAVE_LINUX_SCHED_GETAFFINITY #define NXT_HAVE_LINUX_SCHED_GETAFFINITY 1 #endif in build/include/nxt_auto_config.h It seems this was due to the . auto/feature in auto/otel, this check happens right after the above. Without having nxt_feature_name=NXT_HAVE_OTEL set. Instead we were adding the define for that manually. Doing auto/feature without having a nxt_feature_name must have used the last set one and enabled it. Set nxt_feature_name and remove the manual editing of nxt_auto_config.h Fixes: 9d3dcb800 ("otel: add build tooling to include otel code") Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'auto')
-rw-r--r--auto/otel8
1 files changed, 1 insertions, 7 deletions
diff --git a/auto/otel b/auto/otel
index f23aac3b..8ca325c8 100644
--- a/auto/otel
+++ b/auto/otel
@@ -22,6 +22,7 @@ if [ $NXT_OTEL = YES ]; then
$echo -n " - "
nxt_feature="OpenSSL library"
+ nxt_feature_name=NXT_HAVE_OTEL
nxt_feature_run=yes
nxt_feature_incs=
nxt_feature_libs="-lssl -lcrypto"
@@ -42,11 +43,4 @@ if [ $NXT_OTEL = YES ]; then
NXT_OTEL_LIBS="-lssl -lcrypto"
- cat << END >> $NXT_AUTO_CONFIG_H
-
-#ifndef NXT_HAVE_OTEL
-#define NXT_HAVE_OTEL 1
-#endif
-
-END
fi