Skip to content

Commit 1149d9a

Browse files
committed
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: 9d3dcb8 ("otel: add build tooling to include otel code") Signed-off-by: Andrew Clayton <[email protected]>
1 parent 753e298 commit 1149d9a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

auto/otel

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ if [ $NXT_OTEL = YES ]; then
2222
$echo -n " - "
2323

2424
nxt_feature="OpenSSL library"
25+
nxt_feature_name=NXT_HAVE_OTEL
2526
nxt_feature_run=yes
2627
nxt_feature_incs=
2728
nxt_feature_libs="-lssl -lcrypto"
@@ -42,11 +43,4 @@ if [ $NXT_OTEL = YES ]; then
4243

4344
NXT_OTEL_LIBS="-lssl -lcrypto"
4445

45-
cat << END >> $NXT_AUTO_CONFIG_H
46-
47-
#ifndef NXT_HAVE_OTEL
48-
#define NXT_HAVE_OTEL 1
49-
#endif
50-
51-
END
5246
fi

0 commit comments

Comments
 (0)