Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/internal/cumulative_to_delta.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */

#include <math.h>
#include <unistd.h>

#include <cmetrics/cmetrics.h>
#include <cmetrics/cmt_counter.h>
Expand All @@ -12,6 +11,7 @@
#include <cmetrics/cmt_map.h>
#include <cmetrics/cmt_metric.h>
#include <cfl/cfl_kvlist.h>
#include <fluent-bit/flb_compat.h>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Include flb_compat before cmetrics on Windows

On Windows this include is too late. tests/internal/cumulative_to_delta.c pulls in cmetrics/cmetrics.h first, and lib/cmetrics/include/cmetrics/cmetrics.h:45 -> cmt_compat.h:24-25 already includes <windows.h>. flb_compat.h then defines WIN32_LEAN_AND_MEAN and includes <winsock2.h>, which has to happen before <windows.h> to avoid the winsock.h/winsock2.h redefinition conflict. I checked tests/internal/CMakeLists.txt:117-123 and .github/workflows/call-windows-unit-tests.yaml:206-253; flb-it-cumulative_to_delta is built in the MSVC Windows unit-test job, so this patch still leaves the Windows build broken instead of enabling the test.

Useful? React with 👍 / 👎.


#include "../../plugins/processor_cumulative_to_delta/cumulative_to_delta.h"

Expand Down