From: Dmitry V. Levin Date: Tue, 18 Jul 2023 08:00:00 +0000 (+0000) Subject: locale-util: fix _() definition X-Git-Tag: v254-rc3~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0406e118f5047596127b4676fc1f3e67151fec3;p=thirdparty%2Fsystemd.git locale-util: fix _() definition The previous definition was not quite appropriate for the library code because it relied on the message domain set by textdomain() invocation which is not necessarily the same message domain defined in GETTEXT_PACKAGE macro. The only code that uses _() so far is located in pam_systemd_home.c. Fixes: 20f56fddcd5 ("Add gettext support") --- diff --git a/src/basic/locale-util.h b/src/basic/locale-util.h index 8990cb6a75a..ae2797cd2dc 100644 --- a/src/basic/locale-util.h +++ b/src/basic/locale-util.h @@ -33,7 +33,7 @@ int get_locales(char ***l); bool locale_is_valid(const char *name); int locale_is_installed(const char *name); -#define _(String) gettext(String) +#define _(String) dgettext(GETTEXT_PACKAGE, String) #define N_(String) String void init_gettext(void);