]> code.delx.au - gnu-emacs/commitdiff
Adapt 'struct timespec' to next release of MinGW runtime
authorEli Zaretskii <eliz@gnu.org>
Sun, 7 Jun 2015 15:36:25 +0000 (18:36 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 7 Jun 2015 15:36:25 +0000 (18:36 +0300)
* nt/inc/ms-w32.h (struct timespec): Don't declare if
__struct_timespec_defined is defined.

nt/inc/ms-w32.h

index da772906ddcfd39e9ba8f9eaa3e449a795f6d7a6..bfa5bb5e14916a0d865446c5e970d064b77dda5f 100644 (file)
@@ -310,7 +310,10 @@ int _getpid (void);
    elsewhere, but we don't use lib/time.h where the structure is
    defined.  */
 /* MinGW64 defines 'struct timespec' and _TIMESPEC_DEFINED in sys/types.h.  */
-#ifndef _TIMESPEC_DEFINED
+/* Mingw.org's MinGW runtime versions 3.22 and upward define 'struct
+   timespec' and __struct_timespec_defined in parts/time.h, which is
+   included by time.h.  */
+#if !defined (_TIMESPEC_DEFINED) && !defined (__struct_timespec_defined)
 struct timespec
 {
   time_t       tv_sec;         /* seconds */