Skip to contentSkip to conversation

pph: include config.h from rate_speexrate.c

PATCH Applied Tanu Kaskinen 2 participants 2 messages Jan 27, 2016 – Jan 28, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pph: include config.h from rate_speexrate.c

Fixes compilation against libspeexdsp 1.2rc3.

rate_speexrate.c includes speex_resampler.h, which depends on config.h by referencing the HAVE_SPEEX_SPEEXDSP_TYPES_H macro. AFAIK it's not a good idea to include config.h from headers (I don't know/remember why, though), which is why I include config.h from rate_speexrate.c instead of speex_resampler.h.

---
 pph/rate_speexrate.c | 1 +
 1 file changed, 1 insertion(+)
pph/rate_speexrate.c +1 -0
index 0a1325c..8fc4cef 100644
@@ -28,6 +28,7 @@
    POSSIBILITY OF SUCH DAMAGE.
 */
 
+#include "config.h"
 #include <stdio.h>
 #include <alsa/asoundlib.h>
 #include <alsa/pcm_rate.h>
Signature · 1 line
2.7.0.rc3
Applied
#1 lore raw
Quoted 10 lines · Tanu Kaskinen

Fixes compilation against libspeexdsp 1.2rc3.

rate_speexrate.c includes speex_resampler.h, which depends on config.h by referencing the HAVE_SPEEX_SPEEXDSP_TYPES_H macro. AFAIK it's not a good idea to include config.h from headers (I don't know/remember why, though), which is why I include config.h from rate_speexrate.c instead of speex_resampler.h.

Applied, thanks.

Takashi

Quoted 19 lines
---
 pph/rate_speexrate.c | 1 +
 1 file changed, 1 insertion(+)
pph/rate_speexrate.c +1 -0
index 0a1325c..8fc4cef 100644
@@ -28,6 +28,7 @@
    POSSIBILITY OF SUCH DAMAGE.
 */
 
+#include "config.h"
 #include <stdio.h>
 #include <alsa/asoundlib.h>
 #include <alsa/pcm_rate.h>
Signature · 1 line
2.7.0.rc3