| index deadf80..7451e97 100644 | | index deadf80..7451e97 100644 |
| --- a/src/plugin_services.c | | --- a/src/plugin_services.c |
| +++ b/src/plugin_services.c | | +++ b/src/plugin_services.c |
| @@ -388,8 +388,9 @@ static svc_t *svc_find(const char *name) | | @@ -388,8 +388,9 @@ static svc_t *svc_find(const char *name) |
| 388 | /* ------------------------------------------------------------------ */ | 388 | /* ------------------------------------------------------------------ */ |
| 389 | /* Minimal JSON field extraction (for systemctl --output=json output) */ | 389 | /* Minimal JSON field extraction (for systemctl --output=json output) */ |
| 390 | /* ------------------------------------------------------------------ */ | 390 | /* ------------------------------------------------------------------ */ |
| 391 | -/* The JSON readers and the systemd/launchd parsers are POSIX-only: the | 391 | +/* The JSON readers and the text parsers are POSIX-only: the Windows slice |
| 392 | - * Windows slice talks to the SCM directly and never parses text. */ | 392 | + * talks to the SCM directly and never parses text. The systemd half is Linux |
| | 393 | + * only, because macOS has launchd and needs none of it. */ |
| 393 | #if !defined(_WIN32) | 394 | #if !defined(_WIN32) |
| 394 | | 395 | |
| 395 | static int json_read_string_at(const char **pp, char *out, size_t outsz) | 396 | static int json_read_string_at(const char **pp, char *out, size_t outsz) |
| @@ -679,6 +680,7 @@ static void apply_show(const char *text) | | @@ -679,6 +680,7 @@ static void apply_show(const char *text) |
| 679 | } | 680 | } |
| 680 | | 681 | |
| 681 | /* Containers with no init system: list /proc/<pid> long-running daemons. */ | 682 | /* Containers with no init system: list /proc/<pid> long-running daemons. */ |
| | 683 | +#if !defined(__APPLE__) |
| 682 | static int collect_proc_daemons(void) | 684 | static int collect_proc_daemons(void) |
| 683 | { | 685 | { |
| 684 | const char *root = getenv("SERVICES_MOCK_PROC_DIR"); | 686 | const char *root = getenv("SERVICES_MOCK_PROC_DIR"); |
| @@ -825,7 +827,9 @@ static void collect_systemd(void) | | @@ -825,7 +827,9 @@ static void collect_systemd(void) |
| 825 | } | 827 | } |
| 826 | } | 828 | } |
| 827 | | 829 | |
| 828 | -#endif /* !_WIN32 */ | 830 | +#endif /* !_WIN32 || !__APPLE__ */ |
| | 831 | + |
| | 832 | +#endif /* !__APPLE__ */ |
| 829 | | 833 | |
| 830 | /* ------------------------------------------------------------------ */ | 834 | /* ------------------------------------------------------------------ */ |
| 831 | /* Collection: launchd (macOS) */ | 835 | /* Collection: launchd (macOS) */ |
| @@ -1064,7 +1068,7 @@ static const char *init_name(void) | | @@ -1064,7 +1068,7 @@ static const char *init_name(void) |
| 1064 | static void collect_all(void) | 1068 | static void collect_all(void) |
| 1065 | { | 1069 | { |
| 1066 | const char *allow = getenv("SERVICES_ALLOW_CONTROL"); | 1070 | const char *allow = getenv("SERVICES_ALLOW_CONTROL"); |
| 1067 | -#if !defined(_WIN32) | 1071 | +#if defined(__linux__) |
| 1068 | const char *force = getenv("SERVICES_FORCE_INIT"); | 1072 | const char *force = getenv("SERVICES_FORCE_INIT"); |
| 1069 | #endif | 1073 | #endif |
| 1070 | | 1074 | |
| 1071 | | 1075 | |