From 3bf8e79c3bfee3ca14277aad3d9c406dfc053bbf Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 9 Nov 2015 14:04:11 +0100 Subject: [PATCH] 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 --- bat/Makefile.am | 2 +- bat/alsa.c | 2 +- bat/{signal.h => bat-signal.h} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename bat/{signal.h => bat-signal.h} (100%) diff --git a/bat/Makefile.am b/bat/Makefile.am index 842ae6b..f0dc5ab 100644 --- a/bat/Makefile.am +++ b/bat/Makefile.am @@ -13,7 +13,7 @@ bat_SOURCES = \ noinst_HEADERS = \ common.h \ - signal.h \ + bat-signal.h \ alsa.h \ convert.h \ analyze.h diff --git a/bat/alsa.c b/bat/alsa.c index 582c604..d31a633 100644 --- a/bat/alsa.c +++ b/bat/alsa.c @@ -27,7 +27,7 @@ #include "common.h" #include "alsa.h" -#include "signal.h" +#include "bat-signal.h" struct pcm_container { snd_pcm_t *handle; diff --git a/bat/signal.h b/bat/bat-signal.h similarity index 100% rename from bat/signal.h rename to bat/bat-signal.h -- 2.47.1