]> git.alsa-project.org Git - alsa-utils.git/commit
bat: Avoid local signal.h file
authorTakashi Iwai <tiwai@suse.de>
Mon, 9 Nov 2015 13:04:11 +0000 (14:04 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 9 Nov 2015 13:04:11 +0000 (14:04 +0100)
commit3bf8e79c3bfee3ca14277aad3d9c406dfc053bbf
tree11be4bb8893f6fe98b7c77d21cd14691ff111de2
parentd5a682946d860edc0ace395ea082a2b93b2d6381
bat: Avoid local signal.h file

The local header file named as "signal.h" causes mysterious compile
error when built with an old glibc.
 signal.h:27: error: conflicting types for 'sin_generator_init'
 ./signal.h:27: error: previous declaration of 'sin_generator_init' was here
 signal.h:28: error: conflicting types for 'sin_generator_next_sample'
 ./signal.h:28: error: previous declaration of 'sin_generator_next_sample' was here
 ....

This turned out to be the conflict of signal.h; namely, pthread.h that
is included before our local signal.h also includes "pthread.h".
Since our local "signal.h" has a higher priority, it gets loaded
instead of the expected pthread's one.  Then we load it again, and it
screws up.

Although it's basically a bug of pthread, it's anyway not good to have
a header file conflicting with the standard header file.  So, let's
name it more explicitly as specific to BAT, bat-signal.h, for avoiding
such a conflict.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
bat/Makefile.am
bat/alsa.c
bat/bat-signal.h [moved from bat/signal.h with 100% similarity]