Skip to contentSkip to conversation

alsa: fix configure detection of alsa

PATCH In review Anthony Liguori 4 participants 4 messages Jul 20, 2012 – Jul 21, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsa: fix configure detection of alsa

Handle is uninitialized which causes the configure check to fail.

---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
index cef0a71..8335117 100755
@@ -1888,7 +1888,7 @@ for drv in $audio_drv_list; do
     case $drv in
     alsa)
     audio_drv_probe $drv alsa/asoundlib.h -lasound \
-        "snd_pcm_t **handle; return snd_pcm_close(*handle);"
+        "snd_pcm_t **handle = NULL; return snd_pcm_close(*handle);"
     libs_softmmu="-lasound $libs_softmmu"
     ;;
 
Signature · 1 line
1.7.5.4
#1 lore raw

Am 20.07.2012 23:14, schrieb Anthony Liguori:

Quoted 14 lines

Handle is uninitialized which causes the configure check to fail.

---
  configure |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
configure +0 -0
index cef0a71..8335117 100755

configure for drv in $audio_drv_list; do · line 1894

Quoted 8 lines
configure +1 -1
@@ -1888,7 +1888,7 @@ for drv in $audio_drv_list; do
      case $drv in
      alsa)
      audio_drv_probe $drv alsa/asoundlib.h -lasound \
-        "snd_pcm_t **handle; return snd_pcm_close(*handle);"
+        "snd_pcm_t **handle = NULL; return snd_pcm_close(*handle);"
      libs_softmmu="-lasound $libs_softmmu"
      ;;
 

See also http://patchwork.ozlabs.org/patch/171066/

Regards,

Stefan W.

#2 lore raw
In reply to Anthony Liguori
Quoted 2 lines · Anthony Liguori

Handle is uninitialized which causes the configure check to fail.

http://patchwork.ozlabs.org/patch/171688/

Has an advantage of not expecting alsa/asoundlib.h including stddef.h

Quoted 20 lines
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
index cef0a71..8335117 100755
@@ -1888,7 +1888,7 @@ for drv in $audio_drv_list; do
     case $drv in
     alsa)
     audio_drv_probe $drv alsa/asoundlib.h -lasound \
-        "snd_pcm_t **handle; return snd_pcm_close(*handle);"
+        "snd_pcm_t **handle = NULL; return snd_pcm_close(*handle);"
     libs_softmmu="-lasound $libs_softmmu"
     ;;
 
Signature · 1 line
mailto:[email protected]