Merge "Fix -snapshot-list option."
diff --git a/Makefile.target b/Makefile.target
index 8006c8d..7681dba 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -103,6 +103,9 @@
 LOCAL_CFLAGS += $(ZLIB_CFLAGS)
 endif
 
+# required to ensure we properly initialize virtual audio hardware
+LOCAL_CFLAGS += -DHAS_AUDIO
+
 ifeq ($(EMULATOR_TARGET_ARCH),x86)
 HW_SOURCES += \
     apic.c \
diff --git a/android/console.c b/android/console.c
index 0affb46..505d331 100644
--- a/android/console.c
+++ b/android/console.c
@@ -134,9 +134,6 @@
 ControlClient core_ui_ctl_client = NULL;
 #endif  // CONFIG_STANDALONE_CORE
 
-/* -android-avdname option value. Defined in vl-android.c */
-extern char* android_op_avd_name;
-
 static int
 control_global_add_redir( ControlGlobal  global,
                           int            host_port,
@@ -2207,7 +2204,7 @@
 static int
 do_avd_name( ControlClient  client, char*  args )
 {
-    control_write( client, "%s\r\n", android_op_avd_name);
+    control_write( client, "%s\r\n", android_hw->avd_name);
     return 0;
 }