Fixed issue #26: strcpy_s not available on MinGW.
This commit is contained in:
parent
8378b350df
commit
b9ace81807
@ -568,6 +568,7 @@ CHECK_FUNCTION_EXISTS(gmtime_s VMIME_HAVE_GMTIME_S)
|
||||
CHECK_FUNCTION_EXISTS(gmtime_r VMIME_HAVE_GMTIME_R)
|
||||
CHECK_FUNCTION_EXISTS(localtime_s VMIME_HAVE_LOCALTIME_S)
|
||||
CHECK_FUNCTION_EXISTS(localtime_r VMIME_HAVE_LOCALTIME_R)
|
||||
CHECK_FUNCTION_EXISTS(strcpy_s VMIME_HAVE_STRCPY_S)
|
||||
|
||||
|
||||
##############################################################################
|
||||
|
@ -224,7 +224,13 @@ const vmime::string windowsHandler::getHostName() const
|
||||
return hostname;
|
||||
|
||||
if (::strlen(hostname) == 0)
|
||||
{
|
||||
#if VMIME_HAVE_STRCPY_S
|
||||
::strcpy_s(hostname, "localhost");
|
||||
#else
|
||||
::strcpy(hostname, "localhost");
|
||||
#endif // VMIME_HAVE_STRCPY_S
|
||||
}
|
||||
|
||||
// Try to get canonical name for the hostname
|
||||
struct addrinfo hints;
|
||||
|
Loading…
Reference in New Issue
Block a user