BUG: gettimeofday() didn't handle first argument being NULL

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Feb 20 11:34:33 GMT 2024


On Feb 20 19:15, 109224573 via Cygwin wrote:
> this code works on Linux, but not msys2:
> 
> #include<stdio.h>
> #include<sys time.h="">
> int main() {
>     struct timezone tz;
>     puts("a");
>     gettimeofday(NULL, &tz);
>     puts("b");
> }
> 
> 
> I guess the reason would be
> winsup/cygwin/times.cc

Thanks for the bug report.  Fixed in git.  The test release
cygwin-3.6.0-0.46.g70653fd8f1db containing this patch will be
available shortly.


Corinna


More information about the Cygwin mailing list