Skip to content

Commit

Permalink
Add missing includes to fix build and LSP errors on Mac (#3843)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexJF authored Aug 14, 2024
1 parent 93a2891 commit a589a98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions ext/datadog_profiling_native_extension/clock_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <stdbool.h>
#include <time.h>
#include <ruby.h>

// Contains the operating-system specific identifier needed to fetch CPU-time, and a flag to indicate if we failed to fetch it
typedef struct thread_cpu_time_id {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
#include <pthread.h>
#include <time.h>
#include <errno.h>
#include <ruby.h>

#include "clock_id.h"
#include "helpers.h"
#include "private_vm_api_access.h"
#include "clock_id.h"
#include "time_helpers.h"

// Validate that our home-cooked pthread_id_for() matches pthread_self() for the current thread
Expand Down
3 changes: 1 addition & 2 deletions ext/datadog_profiling_native_extension/clock_id_noop.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
// is not available.
#ifndef HAVE_PTHREAD_GETCPUCLOCKID

#include <ruby.h>

#include "clock_id.h"
#include "helpers.h"
#include "datadog_ruby_common.h"

void self_test_clock_id(void) { } // Nothing to check

Expand Down

0 comments on commit a589a98

Please sign in to comment.