{"thread":{"id":"60831","subject":"[PATCH] imap-send: add missing \"strbuf.h\" include under NO_CURL","startedAt":"2024-02-02T00:18:36Z","lastAt":"2024-02-02T05:09:47Z","messageCount":2,"participants":["Philippe Blain via GitGitGadget","Elijah Newren"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"487784","messageId":"pull.1664.git.git.1706833113569.gitgitgadget@gmail.com","threadId":"60831","inReplyTo":null,"subject":"[PATCH] imap-send: add missing \"strbuf.h\" include under NO_CURL","fromName":"Philippe Blain via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-02-02T00:18:33Z","receivedAt":"2024-02-02T00:18:36Z","isPatch":true,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"From: Philippe Blain <levraiphilippeblain@gmail.com>\n\nBuilding with NO_CURL is currently broken since imap-send.c uses things\ndefined in \"strbuf.h\" wihtout including it.\n\nThe inclusion of that header was removed in eea0e59ffb (treewide: remove\nunnecessary includes in source files, 2023-12-23), which failed to\nnotice that \"strbuf.h\" was transitively included in imap-send.c via\n\"http.h\", but only if USE_CURL_FOR_IMAP_SEND is defined. Add back the\nmissing include. Note that it was explicitely added in 3307f7dde2\n(imap-send: include strbuf.h, 2023-05-17) after a similar breakage in\nba3d1c73da (treewide: remove unnecessary cache.h includes, 2023-02-24) -\nsee the thread starting at [1].\n\nIt can be verified by inspection that this is the only case where a\nheader we include is dependent on a Makefile knob in the files modified\nin eea0e59ffb.\n\n[1] https://lore.kernel.org/git/20230517070632.71884-1-list@eworm.de/\n\nSigned-off-by: Philippe Blain <levraiphilippeblain@gmail.com>\n---\n    imap-send: add missing \"strbuf.h\" include under NO_CURL\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1664%2Fphil-blain%2Fimap-send-include-no-openssl-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1664/phil-blain/imap-send-include-no-openssl-v1\nPull-Request: https://github.com/git/git/pull/1664\n\n imap-send.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/imap-send.c b/imap-send.c\nindex d662811ee83..f2e1947e638 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -28,6 +28,7 @@\n #include \"run-command.h\"\n #include \"parse-options.h\"\n #include \"setup.h\"\n+#include \"strbuf.h\"\n #if defined(NO_OPENSSL) && !defined(HAVE_OPENSSL_CSPRNG)\n typedef void *SSL;\n #endif\n\nbase-commit: bc7ee2e5e16f0d1e710ef8fab3db59ab11f2bbe7\n-- \ngitgitgadget\n"},{"id":"487787","messageId":"CABPp-BH0zZPDd2-dLPbWLFG=G6oE_kM6N2xLwUbzqgZeXCon9A@mail.gmail.com","threadId":"60831","inReplyTo":"pull.1664.git.git.1706833113569.gitgitgadget@gmail.com","subject":"Re: [PATCH] imap-send: add missing \"strbuf.h\" include under NO_CURL","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2024-02-02T05:09:32Z","receivedAt":"2024-02-02T05:09:47Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Thu, Feb 1, 2024 at 4:18 PM Philippe Blain via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n>\n> From: Philippe Blain <levraiphilippeblain@gmail.com>\n>\n> Building with NO_CURL is currently broken since imap-send.c uses things\n> defined in \"strbuf.h\" wihtout including it.\n>\n> The inclusion of that header was removed in eea0e59ffb (treewide: remove\n> unnecessary includes in source files, 2023-12-23), which failed to\n> notice that \"strbuf.h\" was transitively included in imap-send.c via\n> \"http.h\", but only if USE_CURL_FOR_IMAP_SEND is defined. Add back the\n> missing include. Note that it was explicitely added in 3307f7dde2\n> (imap-send: include strbuf.h, 2023-05-17) after a similar breakage in\n> ba3d1c73da (treewide: remove unnecessary cache.h includes, 2023-02-24) -\n> see the thread starting at [1].\n\nUgh, sorry.\n\n> It can be verified by inspection that this is the only case where a\n> header we include is dependent on a Makefile knob in the files modified\n> in eea0e59ffb.\n\nThanks for checking.\n\n> [1] https://lore.kernel.org/git/20230517070632.71884-1-list@eworm.de/\n>\n> Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>\n> ---\n>     imap-send: add missing \"strbuf.h\" include under NO_CURL\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1664%2Fphil-blain%2Fimap-send-include-no-openssl-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1664/phil-blain/imap-send-include-no-openssl-v1\n> Pull-Request: https://github.com/git/git/pull/1664\n>\n>  imap-send.c | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/imap-send.c b/imap-send.c\n> index d662811ee83..f2e1947e638 100644\n> --- a/imap-send.c\n> +++ b/imap-send.c\n> @@ -28,6 +28,7 @@\n>  #include \"run-command.h\"\n>  #include \"parse-options.h\"\n>  #include \"setup.h\"\n> +#include \"strbuf.h\"\n>  #if defined(NO_OPENSSL) && !defined(HAVE_OPENSSL_CSPRNG)\n>  typedef void *SSL;\n>  #endif\n>\n> base-commit: bc7ee2e5e16f0d1e710ef8fab3db59ab11f2bbe7\n> --\n> gitgitgadget\n\nAgain, thanks for cleaning this up for me.\n"}]}