__USE_GNU_GETTEXT is exposed by musl because they provide
a GNU gettext-compatible interface. This doesn't mean they
provide all the internals that glibc does.
Check for __GLIBC__ if using internal _nl_msg_cat_cntr.
Signed-off-by: Sam James (sam_c) <sam@cmpct.info>
/anope/src/misc.cpp: In function ‘Anope::string Anope::Resolve(const Anope::string&, int)’:
/anope/src/misc.cpp:742:60: warning: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘union sockaddrs’ from an array of ‘struct sockaddr’ [-Wclass-memaccess]
memcpy(&addr, addrresult->ai_addr, addrresult->ai_addrlen);
^
In file included from /anope/include/users.h:21,
from /anope/include/bots.h:12,
from /anope/include/regchannel.h:18,
from /anope/include/config.h:16,
from /anope/src/misc.cpp:16:
/anope/include/sockets.h:27:18: note: ‘union sockaddrs’ declared here
union CoreExport sockaddrs
^~~~~~~~~
After sending the "\r\n.\r\n" after the mail payload, smtp_send_email was not waiting for the mail server to complete post-processing and respond with "250", but was sending "QUIT\r\n" immediately and dropping the connection. Mail server may kill the transaction if it can't send the "250" (socket closed). The changes proposed completes the mail transaction by reading for the 250 and in smtp_disconnect steps through a proper quit sequence by waiting for the 221 server response.
I discovered this by including the --debug option in services.conf sendmailpath, which invoked logging in smtp_send and that slowed it down enough for the mail server to return the 250 and complete the transaction.
This was done with:
find docs/ include/ language/ modules/ src/ *.* Config -exec sed -i 's/-20.. Anope Team/-2017 Anope Team/i' {} \;
Added missing copyright headers to files that didn't have it yet.