test/sbc+hfp: use O_RDONLY to read packet log on windows

This commit is contained in:
Matthias Ringwald 2019-01-03 12:11:19 +01:00
parent ca13daef16
commit 6cfd76e47e
2 changed files with 10 additions and 2 deletions

View File

@ -85,7 +85,11 @@ static void process_file(const char * pklg_path, const char * wav_path, int pack
printf("Processing %s -> %s: PLC enabled: %u, direction %s\n", pklg_path, wav_path, plc_enabled, packet_type == PAKET_TYPE_SCO_OUT ? "Out" : "In");
int fd = open(pklg_path, O_RDONLY);
int oflags = O_RDONLY;
#ifdef _WIN32
oflags |= O_BINARY;
#endif
int fd = open(pklg_path, oflags);
if (fd < 0) {
printf("Can't open file %s", pklg_path);
return;

View File

@ -95,7 +95,11 @@ static void process_file(const char * pklg_path, const char * wav_path, int pack
printf("Processing %s -> %s: PLC enabled: %u, direction %s\n", pklg_path, wav_path, plc_enabled, packet_type == PAKET_TYPE_SCO_OUT ? "Out" : "In");
int fd = open(pklg_path, O_RDONLY);
int oflags = O_RDONLY;
#ifdef _WIN32
oflags |= O_BINARY;
#endif
int fd = open(pklg_path, oflags);
if (fd < 0) {
printf("Can't open file %s", pklg_path);
return;