Skip to contentSkip to conversation

: timer.h doesn't compile with -ansi

ALSA - lib 0002256 [email protected] 1 participant 1 message Jul 6, 2006

lore
Share & tools
lore
#0 lore raw

A NOTE has been added to this issue.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2256>
======================================================================
Reported By: joeljkp
Assigned To:
======================================================================

Project:                    ALSA - lib
Issue ID:                   2256
Category:                   0_general
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             07-04-2006 05:51 CEST
Last Modified:              07-06-2006 05:06 CEST

======================================================================
Summary: timer.h doesn't compile with -ansi
Description:
timer.h causes programs not to compile with gcc 4.0.3 and -ansi:

$ cat test.c
#include <alsa/asoundlib.h>
$ cc -c -ansi test.c
In file included from /usr/include/alsa/asoundlib.h:51,
                 from test.c:1:
/usr/include/alsa/timer.h:108: error: field &#8216;tstamp&#8217; has
incomplete type
$
======================================================================

----------------------------------------------------------------------
tiwai - 07-05-06 15:31
----------------------------------------------------------------------
The patch results in compile warnings of alsa-lib itself. I'm also a bit concerned to define it in that place, too...

----------------------------------------------------------------------
joeljkp - 07-06-06 05:06
----------------------------------------------------------------------
Ok, a new patch is uploaded.

When -ansi is not specified, glibc defines _POSIX_C_SOURCE, but when -ansi is specified, is does not. Therefore, ALSA should define it explicitly at the very beginning if it intends to use POSIX features like timespec.

Issue History
Date Modified Username Field Change
======================================================================

07-04-06 05:51 joeljkp        New Issue                                    
07-04-06 05:52 joeljkp        Issue Monitored: joeljkp                     
07-04-06 07:01 joeljkp        Note Added: 0010815                          
07-04-06 18:43 joeljkp        File Added: bug2256.patch                    
07-05-06 15:31 tiwai          Note Added: 0010840                          
07-06-06 05:04 joeljkp        File Added: bug2256-1.patch                    
07-06-06 05:06 joeljkp        Note Added: 0010852                          

======================================================================

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642