Fix memset_s() compilation errors under macOS with some SDKs
Define __STDC_WANT_LIB_EXT1__ as early as possible to ensure that it's defined before string.h is included by some other header without it. Closes #19334.
This commit is contained in:
@@ -18,6 +18,10 @@
|
||||
// for compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
// Define this as soon as possible and before string.h is included to get
|
||||
// memset_s() declaration from it if available.
|
||||
#define __STDC_WANT_LIB_EXT1__ 1
|
||||
|
||||
#include "wx/utils.h"
|
||||
|
||||
#if !defined(HAVE_SETENV) && defined(HAVE_PUTENV)
|
||||
@@ -113,8 +117,6 @@
|
||||
#define _LANGUAGE_C_PLUS_PLUS 1
|
||||
#endif // SGI hack
|
||||
|
||||
#define __STDC_WANT_LIB_EXT1__ 1 // for memset_s() in <string.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
|
||||
Reference in New Issue
Block a user