On Sat, Dec 10, 2022 at 11:01 PM Roger Pack <rogerdp...@gmail.com> wrote:

> I received some complaints saying in mingw it was"requiring windows 8" for
> a certain library.
>
> "Entry point not found, GetSystemTimePreciseAsFileTime could not be
> located in the dynamic link library KERNEL32.dll".
>
> mingw appears to have the following:
>
> #define _WIN32_WINNT 0x502
> #define _WIN32_WINNT_WIN8 0x0602
>
> Perhaps the following patch?  Thanks! :)
>
> diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
> index 36c7920af..428cc4f30 100644
> --- a/lib/gettimeofday.c
> +++ b/lib/gettimeofday.c
> @@ -35,7 +35,7 @@
>  # undef LoadLibrary
>  # define LoadLibrary LoadLibraryA
>
> -# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8)
> +# if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
>
>  /* Avoid warnings from gcc -Wcast-function-type.  */
>  #  define GetProcAddress \
>

Oops looks like it might be more like the following. Thanks.

diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
index 36c7920af..fdc236883 100644
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -35,7 +35,7 @@
 # undef LoadLibrary
 # define LoadLibrary LoadLibraryA

-# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8)
+# if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)

 /* Avoid warnings from gcc -Wcast-function-type.  */
 #  define GetProcAddress \
@@ -94,7 +94,7 @@ gettimeofday (struct timeval *restrict tv, void *restrict
tz)
      <http://www.windowstimestamp.com/description>.  */
   FILETIME current_time;

-# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8)
+# if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
   if (!initialized)
     initialize ();
 # endif

Reply via email to