hal: compilation fix for extended feature flags
- Fix compilation error for offload, Dolby,
HDMI pass through, FLAC decoder, and hardware
accelerated effects when extended feature
flags are disabled.
Change-Id: I5b36d7668f63a396ed930d62c0337c2c3f311c95
diff --git a/audiod/AudioDaemon.cpp b/audiod/AudioDaemon.cpp
index b4857c4..6f38218 100644
--- a/audiod/AudioDaemon.cpp
+++ b/audiod/AudioDaemon.cpp
@@ -125,6 +125,7 @@
struct dirent* in_file;
int fd;
String8 path;
+ String8 d_name;
if ((dp = opendir(events_dir)) == NULL) {
ALOGE("Cannot open switch directory to get list of audio events %s", events_dir);
@@ -148,8 +149,9 @@
if (fd == -1) {
ALOGE("Open %s failed : %s", path.string(), strerror(errno));
} else {
- mAudioEvents.push_back(std::make_pair(in_file->d_name, fd));
- mAudioEventsStatus.push_back(std::make_pair(in_file->d_name, 0));
+ d_name = in_file->d_name;
+ mAudioEvents.push_back(std::make_pair(d_name, fd));
+ mAudioEventsStatus.push_back(std::make_pair(d_name, 0));
ALOGD("event status mAudioEventsStatus= %s",
mAudioEventsStatus[0].first.string());
}