| index 6902b96..cd49e27 100644 | | index 6902b96..cd49e27 100644 |
| --- a/src/plugin_services.c | | --- a/src/plugin_services.c |
| +++ b/src/plugin_services.c | | +++ b/src/plugin_services.c |
| @@ -189,6 +189,7 @@ static void str_copy(char *dst, size_t sz, const char *src) | | @@ -189,6 +189,7 @@ static void str_copy(char *dst, size_t sz, const char *src) |
| 189 | dst[n] = '\0'; | 189 | dst[n] = '\0'; |
| 190 | } | 190 | } |
| 191 | | 191 | |
| | 192 | +#if !defined(_WIN32) |
| 192 | static void str_trim(char *s) | 193 | static void str_trim(char *s) |
| 193 | { | 194 | { |
| 194 | char *p; | 195 | char *p; |
| @@ -200,6 +201,7 @@ static void str_trim(char *s) | | @@ -200,6 +201,7 @@ static void str_trim(char *s) |
| 200 | n = strlen(s); | 201 | n = strlen(s); |
| 201 | while (n > 0 && isspace((unsigned char)s[n - 1])) s[--n] = '\0'; | 202 | while (n > 0 && isspace((unsigned char)s[n - 1])) s[--n] = '\0'; |
| 202 | } | 203 | } |
| | 204 | +#endif |
| 203 | | 205 | |
| 204 | static void url_decode(char *s) | 206 | static void url_decode(char *s) |
| 205 | { | 207 | { |
| @@ -359,6 +361,7 @@ static int run_argv(char *const argv[]) | | @@ -359,6 +361,7 @@ static int run_argv(char *const argv[]) |
| 359 | /* ------------------------------------------------------------------ */ | 361 | /* ------------------------------------------------------------------ */ |
| 360 | /* The JSON readers and the systemd/launchd parsers are POSIX-only: the | 362 | /* The JSON readers and the systemd/launchd parsers are POSIX-only: the |
| 361 | * Windows slice talks to the SCM directly and never parses text. */ | 363 | * Windows slice talks to the SCM directly and never parses text. */ |
| | 364 | +#if !defined(_WIN32) |
| 362 | | 365 | |
| 363 | static int json_read_string_at(const char **pp, char *out, size_t outsz) | 366 | static int json_read_string_at(const char **pp, char *out, size_t outsz) |
| 364 | { | 367 | { |
| @@ -478,7 +481,6 @@ static svc_t *svc_find(const char *name) | | @@ -478,7 +481,6 @@ static svc_t *svc_find(const char *name) |
| 478 | return NULL; | 481 | return NULL; |
| 479 | } | 482 | } |
| 480 | | 483 | |
| 481 | -#if !defined(_WIN32) | | |
| 482 | static char *read_file_all(const char *path, size_t *len) | 484 | static char *read_file_all(const char *path, size_t *len) |
| 483 | { | 485 | { |
| 484 | FILE *f; | 486 | FILE *f; |
| 485 | | 487 | |