Re: [PATCH] Use mingw.h declarations for gmtime_r/localtime_r on msys2
- From
Mike Hommey <mh@glandium.org>
- Date
- Nov 18, 2021, 05:34 UTC
- Message-ID
- <20211118053415.4axljmr4s6kmqmms@glandium.org>
- In-Reply-To
- <CAPUEspg-5+YdfTJ6zi9hdDqF=KV2LJFCtqmECSss9Kfpn6sGrQ@mail.gmail.com>
On Wed, Nov 17, 2021 at 08:51:06PM -0800, Carlo Arenas wrote:
Show 20 quoted lines
> On Wed, Nov 17, 2021 at 7:03 PM Mike Hommey <mh@glandium.org> wrote: > > > > On Tue, Oct 05, 2021 at 12:12:12AM -0700, Carlo Arenas wrote: > > > On Mon, Oct 4, 2021 at 11:57 PM Mike Hommey <mh@glandium.org> wrote: > > > > A possible alternative fix would be to e.g. add `#define _POSIX_C_SOURCE > > > > 200112L` to git-compat-util.h and add `ifndef __MINGW64_VERSION_MAJOR` > > > > around the definitions of `gmtime_r` and `localtime_r` in > > > > compat/mingw.c, since, after all, they are available there. > > > > > > something like that was merged to "main"[1] a few months ago, would > > > that work for you? > > > > > > Carlo > > > > > > [1] https://github.com/git-for-windows/git/commit/9e52042d4a4ee2d91808dda71e7f2fdf74c83862 > > > > Since this reached 2.34 > > It is not in 2.34; only in the git for windows fork, but agree is > needed if you are building master with a newish mingw
Err, I did mean 2.34.0.windows.1. My working workaround is to build with -D_POSIX_THREAD_SAFE_FUNCTIONS=200112L.