We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2635b7 commit 9d6452dCopy full SHA for 9d6452d
1 file changed
plugins/out_gcs/gcs.c
@@ -74,6 +74,14 @@ static int gcs_under_test_mode(void)
74
return FLB_FALSE;
75
}
76
77
+static int gcs_setenv(const char *key, const char *val)
78
+{
79
+#ifdef FLB_SYSTEM_WINDOWS
80
+ return _putenv_s(key, val);
81
+#else
82
+ return setenv(key, val, 1);
83
+#endif
84
+}
85
86
static void mock_gcs_call_increment_counter(const char *api)
87
{
@@ -87,7 +95,7 @@ static void mock_gcs_call_increment_counter(const char *api)
95
count = val ? atoi(val) : 0;
88
96
count++;
89
97
snprintf(buf, sizeof(buf), "%d", count);
90
- setenv(env_var, buf, 1);
98
+ gcs_setenv(env_var, buf);
91
99
92
100
93
101
static int read_seq_index(const char *path, uint64_t *out_value)
0 commit comments