X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=igv lSthdCk6TySavsmmY8DhBfyqxVaFZyXdq6wSdc9jya1auymX6PXBRD2MijrAKB5K oH/2oIgdUf9ua5VU4Qdr4gAMtp09DG+No8a1WIuaZ/SuWZcrbh8hZWyMb1Sc0Plz TjZXsNus21ZIDQZvl/r2LoNz0uOqDFtqJeZGNXdU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=TJ8d24K2H FnwmGdtXmsmGNyXAfg=; b=B22iCe6a1vXIxlLYZaQqEcESOVYodHqQlieOWMlW2 fMMGLEG5/7x8elQBBX/c74rF80tzWAzNPsZtGaz8rNbXUT2BzzKPfwXJ41Z5FDya SySg+XRFvJNcCl+XISW+mUIJR6oBwy5P3ZyqaU1h0ybUwBCpWF2Nqw1GAONRml4s 80= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=gettimeofday, H*M:post X-HELO: plane.gmane.org To: cygwin AT cygwin DOT com From: Stephen Sheldon Subject: gettimeofday not defined Date: Sun, 19 Jun 2016 19:30:11 +0000 (UTC) Lines: 25 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Sometime in the past several months MPlayer stopped compiling for Cygwin. There was a complaint about gettimeofday not being defined. The failing file did include sys/time.h, which contains a definition. I found one similar report on the Cygwin mailing list. I noticed that MPlayer was putting the macro "-D_ISOC99_SOURCE=1" on the gcc command line. I replaced it with "-D_DEFAULT_SOURCE=1" and MPlayer compiled. It also works without any ...SOURCE. Here is a small test case to show the problem: //#define _ISOC99_SOURCE 1 #define _DEFAULT_SOURCE 1 #include int main() { struct timeval start; gettimeofday(&start, NULL); } It compiles with _DEFAULT_SOURCE or without any ...SOURCE. I hope someone can examine the very complicated #if statements in sys/feature.h and sys/time.h and tell me that whether I should raise the issue with the MPLayer folks or not. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple