From 414a4969b98fabd1598933d48aea4c5f19db7a7f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 29 Jul 2018 20:07:09 +0300 Subject: [PATCH] Avoid gettimeofday deprecation warnings with MinGW * nt/inc/ms-w32.h (__POSIX_2008_DEPRECATED) [__MINGW32_VERSION >= 5001000L]: Define to nothing, to avoid deprecation warnings about gettimeofday with mingw.org's MinGW runtime 5.1 and later. --- nt/inc/ms-w32.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index d15b6da1a74..e4dec04fb8b 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -34,6 +34,11 @@ along with GNU Emacs. If not, see . */ # ifdef __MINGW64_VERSION_MAJOR # define MINGW_W64 # endif +# if defined __MINGW32_VERSION && __MINGW32_VERSION >= 5001000L +/* Avoid warnings about gettimeofday being deprecated. */ +# undef __POSIX_2008_DEPRECATED +# define __POSIX_2008_DEPRECATED +# endif #endif /* #undef const */ -- 2.39.2