mirror of
https://github.com/openssl/openssl.git
synced 2024-11-24 18:43:34 +08:00
BIO: Undefine UNICODE in b_addr.c to get POSIX declaration of gai_strerror()
When UNICODE is defined, Windows headers push for WCHAR implementations, which aren't compatible with POSIX declarations. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13318)
This commit is contained in:
parent
105d01f1eb
commit
256d41d437
@ -11,6 +11,16 @@
|
||||
# define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
/*
|
||||
* VC configurations may define UNICODE, to indicate to the C RTL that
|
||||
* WCHAR functions are preferred.
|
||||
* This affects functions like gai_strerror(), which is implemented as
|
||||
* an alias macro for gai_strerrorA() (which returns a const char *) or
|
||||
* gai_strerrorW() (which returns a const WCHAR *). This source file
|
||||
* assumes POSIX declarations, so prefer the non-UNICODE definitions.
|
||||
*/
|
||||
#undef UNICODE
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user