Skip to content

Commit a2f46f5

Browse files
committed
Properly use the NOOP implementation of otel_process
1 parent 8b953d2 commit a2f46f5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ddprof-lib/src/main/cpp/otel_process_ctx.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#ifdef __linux__
21
#include "otel_process_ctx.h"
32

43
#include <limits.h>
@@ -13,8 +12,6 @@
1312
#include <stdio.h>
1413
#include <stdlib.h>
1514
#include <string.h>
16-
#include <sys/mman.h>
17-
#include <sys/prctl.h>
1815
#include <unistd.h>
1916

2017
#define ADD_QUOTES_HELPER(x) #x
@@ -61,6 +58,8 @@ static const otel_process_ctx_data empty_data = {
6158
#endif // OTEL_PROCESS_CTX_NO_READ
6259
#else // OTEL_PROCESS_CTX_NOOP
6360

61+
#include <sys/mman.h>
62+
#include <sys/prctl.h>
6463
/**
6564
* The process context data that's written into the published anonymous mapping.
6665
*
@@ -509,4 +508,3 @@ static otel_process_ctx_result otel_process_ctx_encode_payload(char **out, uint3
509508
#endif // OTEL_PROCESS_CTX_NO_READ
510509

511510
#endif // OTEL_PROCESS_CTX_NOOP
512-
#endif // __linux__

0 commit comments

Comments
 (0)