X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C59263858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1708428897; bh=5Er83M0iMNtnY/qWy1btG4KJF9J1IAysgmmKQTk1fOU=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=VIcEPbhfm/N++L5uxJ9n7FWgGuWNToACQxE5dRyDO2arjweP3Gkxza140EBIn+C7C DIABCLf1r+2HlOQuVGwYng4FRl2D7xdgWakQdHRYWadCZRNHVJOKNfbLqAUY6V4C1i 8G7l8B8ascu/GSG745KtfOp73IwR74CrVm07h8Us= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E35E3858D20 Date: Tue, 20 Feb 2024 12:34:33 +0100 To: 109224573 <109224573 AT qq DOT com> Subject: Re: BUG: gettimeofday() didn't handle first argument being NULL Message-ID: Mail-Followup-To: 109224573 <109224573 AT qq DOT com>, cygwin References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen , cygwin Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Feb 20 19:15, 109224573 via Cygwin wrote: > this code works on Linux, but not msys2: > > #include > #include > 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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple