From f0a11128169ed1dc368cb0e080aaf3455c910f3a Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 22 Nov 2023 20:00:18 +0100 Subject: [PATCH] tools: fix the build --- tools/engineering.c | 3 +++ tools/smscrypt.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/engineering.c b/tools/engineering.c index d1095bb..f15da64 100644 --- a/tools/engineering.c +++ b/tools/engineering.c @@ -34,6 +34,9 @@ #ifndef PROGNAME_ENGINEERING # define PROGNAME_ENGINEERING "engineering" #endif +#ifndef PROGNAME +# define PROGNAME PROGNAME_ENGINEERING +#endif #include "common.c" diff --git a/tools/smscrypt.c b/tools/smscrypt.c index e22717b..97cd608 100644 --- a/tools/smscrypt.c +++ b/tools/smscrypt.c @@ -32,8 +32,8 @@ #include #include "../src/plugins/smscrypt.c" -#ifndef SMSCRYPT_PROGNAME -# define SMSCRYPT_PROGNAME "smscrypt" +#ifndef PROGNAME_SMSCRYPT +# define PROGNAME_SMSCRYPT "smscrypt" #endif @@ -113,7 +113,7 @@ static void _hexdump(char const * buf, size_t len) /* usage */ static int _usage(void) { - fputs("Usage: " SMSCRYPT_PROGNAME " [-p number] message\n", stderr); + fputs("Usage: " PROGNAME_SMSCRYPT " [-p number] message\n", stderr); return 1; } @@ -164,7 +164,7 @@ static gboolean _main_idle(gpointer data) plugin.helper = &helper; if(_smscrypt_init(&plugin) != 0) { - error_print(SMSCRYPT_PROGNAME); + error_print(PROGNAME_SMSCRYPT); return FALSE; } if((p = strdup(mn->message)) == NULL)