net-mail/notmuch: Add missing patch for 0.29.2
[gentoo.git] / net-mail / notmuch / files / 0.29.2-0001-Use-loopback-IP-address-rather-than-name.patch
1 From 59b5bfb6e2095c62925b31e087571506edae7956 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Amadeusz=20Piotr=20=C5=BBo=C5=82nowski?=
3  <aidecoe@aidecoe.name>
4 Date: Sun, 7 Jul 2019 11:33:09 +0100
5 Subject: [PATCH] Use loopback IP address rather than name
6
7 ---
8  test/smtp-dummy.c | 8 ++++----
9  test/test-lib.sh  | 2 +-
10  2 files changed, 5 insertions(+), 5 deletions(-)
11
12 diff --git a/test/smtp-dummy.c b/test/smtp-dummy.c
13 index a7c1fe4f..822a986a 100644
14 --- a/test/smtp-dummy.c
15 +++ b/test/smtp-dummy.c
16 @@ -76,7 +76,7 @@ process_command (FILE *peer, FILE *output, const char *command)
17         fprintf (peer, "502 not implemented\r\n");
18         fflush (peer);
19      } else if (STRNCMP_LITERAL (command, "HELO ") == 0) {
20 -       fprintf (peer, "250 localhost\r\n");
21 +       fprintf (peer, "250 127.0.0.1\r\n");
22         fflush (peer);
23      } else if (STRNCMP_LITERAL (command, "MAIL FROM:") == 0 ||
24                STRNCMP_LITERAL (command, "RCPT TO:") == 0) {
25 @@ -105,7 +105,7 @@ do_smtp_to_file (FILE *peer, FILE *output)
26      size_t line_size;
27      ssize_t line_len;
28  
29 -    fprintf (peer, "220 localhost smtp-dummy\r\n");
30 +    fprintf (peer, "220 127.0.0.1 smtp-dummy\r\n");
31      fflush (peer);
32  
33      while ((line_len = getline (&line, &line_size, peer)) != -1) {
34 @@ -183,9 +183,9 @@ main (int argc, char *argv[])
35         goto DONE;
36      }
37  
38 -    hostinfo = gethostbyname ("localhost");
39 +    hostinfo = gethostbyname ("127.0.0.1");
40      if (hostinfo == NULL) {
41 -       fprintf (stderr, "Unknown host: localhost\n");
42 +       fprintf (stderr, "Unknown host: 127.0.0.1\n");
43         ret = 1;
44         goto DONE;
45      }
46 diff --git a/test/test-lib.sh b/test/test-lib.sh
47 index 616cb674..dd887773 100644
48 --- a/test/test-lib.sh
49 +++ b/test/test-lib.sh
50 @@ -336,7 +336,7 @@ emacs_deliver_message ()
51      test_emacs \
52         "(let ((message-send-mail-function 'message-smtpmail-send-it)
53                (mail-host-address \"example.com\")
54 -              (smtpmail-smtp-server \"localhost\")
55 +              (smtpmail-smtp-server \"127.0.0.1\")
56                (smtpmail-smtp-service \"${smtp_dummy_port}\"))
57            (notmuch-mua-mail)
58            (message-goto-to)
59 -- 
60 2.19.2
61