兼容glibc
Change-Id: I7b1361d8f1e3c31c2d94b31b6addc32869dee457
diff --git a/mbtk/libmbtk_audio/src/mbtk_pcm_stream.c b/mbtk/libmbtk_audio/src/mbtk_pcm_stream.c
index 54ae1be..5c592fc 100755
--- a/mbtk/libmbtk_audio/src/mbtk_pcm_stream.c
+++ b/mbtk/libmbtk_audio/src/mbtk_pcm_stream.c
@@ -23,7 +23,7 @@
static pthread_t recorder_thread_play;
static int lock_get() {
- int fd = open(LOCK_FILE, O_WRONLY | O_CREAT | O_TRUNC);
+ int fd = open(LOCK_FILE, O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (fd == -1) {
LOGE("Open(%s) fail:%d", LOCK_FILE, errno);
return -1;
@@ -46,7 +46,7 @@
}
static int lock_free() {
- int fd = open(LOCK_FILE, O_WRONLY | O_CREAT | O_TRUNC);
+ int fd = open(LOCK_FILE, O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (fd == -1) {
LOGE("Open(%s) fail:%d", LOCK_FILE, errno);
return -1;
diff --git a/mbtk/libmbtk_audio/src/mbtk_wav.c b/mbtk/libmbtk_audio/src/mbtk_wav.c
index cfe08a8..f2e104c 100755
--- a/mbtk/libmbtk_audio/src/mbtk_wav.c
+++ b/mbtk/libmbtk_audio/src/mbtk_wav.c
@@ -362,7 +362,7 @@
mbtk_audio_pcm_sample_rate_set(sample_rate);
- wav_recorder_fd = open(path, O_WRONLY | O_CREAT | O_TRUNC);
+ wav_recorder_fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (wav_recorder_fd < 0) {
LOGE("%s: error opening file %s!", __FUNCTION__, path);
return -1;