Skip to content

Commit

Permalink
fix compilation on windows (netdata#18823)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsaou authored Oct 19, 2024
1 parent d091649 commit 39e7628
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/collectors/apps.plugin/apps_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void send_resource_usage_to_netdata(usec_t dt) {
, inodes_changed_counter
, links_changed_counter
, all_pids_count()
, all_file_len_get()
, all_files_len_get()
, apps_groups_targets_count
, targets_assignment_counter
);
Expand Down
17 changes: 9 additions & 8 deletions src/collectors/apps.plugin/apps_pid_files.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

#include "apps_plugin.h"

static uint32_t
all_files_len = 0,
all_files_size = 0;

uint32_t all_files_len_get(void) {
(void)all_files_size;
return all_files_len;
}

#if (PROCESSES_HAVE_FDS == 1)
// ----------------------------------------------------------------------------
// file descriptor
Expand Down Expand Up @@ -38,14 +47,6 @@ struct file_descriptor {
FD_FILETYPE type;
} *all_files = NULL;

static uint32_t
all_files_len,
all_files_size;

uint32_t all_file_len_get(void) {
return all_files_len;
}

// ----------------------------------------------------------------------------

static inline void reallocate_target_fds(struct target *w) {
Expand Down
2 changes: 1 addition & 1 deletion src/collectors/apps.plugin/apps_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ struct pid_fd {

#define pid_stat_comm(p) (string2str(p->comm))
#define pid_stat_cmdline(p) (string2str(p->cmdline))
uint32_t all_file_len_get(void);
uint32_t all_files_len_get(void);

struct pid_stat {
int32_t pid;
Expand Down

0 comments on commit 39e7628

Please sign in to comment.