From: Martti Rannanjärvi Date: Mon, 17 Jun 2019 17:51:36 +0000 (+0300) Subject: lda: Stop using SMTP_ADDRESS_LITERAL() macro X-Git-Tag: 2.3.9~441 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e1c2602e846ec829f19815b6dd6e036d59f71e2;p=thirdparty%2Fdovecot%2Fcore.git lda: Stop using SMTP_ADDRESS_LITERAL() macro Change DEFAULT_ENVELOPE_SENDER to a const struct smtp_address instead. gcc 9 no longer stores compound literals in function scope, so this is safer. --- diff --git a/src/lda/main.c b/src/lda/main.c index f4b371d728..3cd6b46005 100644 --- a/src/lda/main.c +++ b/src/lda/main.c @@ -32,8 +32,9 @@ #include #include -#define DEFAULT_ENVELOPE_SENDER \ - SMTP_ADDRESS_LITERAL("MAILER-DAEMON", NULL) +const struct smtp_address default_envelope_sender = { + "MAILER-DAEMON", NULL +}; /* After buffer grows larger than this, create a temporary file to /tmp where to read the mail. */ @@ -157,7 +158,7 @@ lda_raw_mail_open(struct mail_deliver_input *dinput, const char *path) sets[0]); mail_from = (dinput->mail_from != NULL ? - dinput->mail_from : DEFAULT_ENVELOPE_SENDER); + dinput->mail_from : &default_envelope_sender); if (path == NULL) { input = create_raw_stream(dinput, 0, &mtime); i_stream_set_name(input, "stdin");