diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libcoopgamma.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/libcoopgamma.c b/src/libcoopgamma.c index 14d085c..8d182d0 100644 --- a/src/libcoopgamma.c +++ b/src/libcoopgamma.c @@ -34,6 +34,11 @@ +#if !defined(COOPGAMMAD) +# define COOPGAMMAD "coopgammad" +#endif + + #if defined(__clang__) # pragma GCC diagnostic ignored "-Wdocumentation" @@ -1081,7 +1086,7 @@ char** libcoopgamma_get_methods(void) */ static char* libcoopgamma_query(const char* restrict method, const char* restrict site, const char* restrict arg) { - const char* (args[7]) = {"coopgammad", arg}; + const char* (args[7]) = {COOPGAMMAD, arg}; size_t i = 2, n = 0, size = 0; int pipe_rw[2] = { -1, -1 }; pid_t pid; @@ -1114,7 +1119,7 @@ static char* libcoopgamma_query(const char* restrict method, const char* restric # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wcast-qual" #endif - execvp("coopgammad", (char* const*)(args)); + execvp(COOPGAMMAD, (char* const*)(args)); #if defined(__GNUC__) # pragma GCC diagnostic pop #endif @@ -1354,7 +1359,7 @@ char* libcoopgamma_get_socket_file(const char* restrict method, const char* rest int libcoopgamma_connect(const char* restrict method, const char* restrict site, libcoopgamma_context_t* restrict ctx) { - const char* (args[6]) = {"coopgammad"}; + const char* (args[6]) = {COOPGAMMAD}; struct sockaddr_un address; char* path; int saved_errno; @@ -1400,7 +1405,7 @@ int libcoopgamma_connect(const char* restrict method, const char* restrict site, # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wcast-qual" #endif - execvp("coopgammad", (char* const*)(args)); + execvp(COOPGAMMAD, (char* const*)(args)); #if defined(__GNUC__) # pragma GCC diagnostic pop #endif |