Skip to content

Commit

Permalink
out_cloudwatch_logs: don't include <unistd.h> on Windows (fluent#2631)
Browse files Browse the repository at this point in the history
MSVC++ does not provide <unistd.h>. For this reason, including
this header breaks the compilation on Windows.

Fix it by adding an ifdef block to the header.

Signed-off-by: Fujimoto Seiji <[email protected]>
  • Loading branch information
fujimotos authored and Magnus Sirviö committed Oct 7, 2020
1 parent b22f91d commit 1a7fec4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/out_cloudwatch_logs/cloudwatch_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
#include <msgpack.h>
#include <string.h>
#include <stdio.h>

#ifndef FLB_SYSTEM_WINDOWS
#include <unistd.h>
#endif

#include "cloudwatch_api.h"

Expand Down

0 comments on commit 1a7fec4

Please sign in to comment.