mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 03:35:42 +01:00
aplay: Use open() instead of open64()
AC_SYS_LARGEFILE in configure.in will automatically set up defines so that open() will support large files if supported, and if not, this allows us to fall back gracefully to non-LFS open(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
ae0a7d6f0a
commit
16bc934c0b
1 changed files with 3 additions and 3 deletions
|
@ -2499,7 +2499,7 @@ static void playback(char *name)
|
||||||
name = "stdin";
|
name = "stdin";
|
||||||
} else {
|
} else {
|
||||||
init_stdin();
|
init_stdin();
|
||||||
if ((fd = open64(name, O_RDONLY, 0)) == -1) {
|
if ((fd = open(name, O_RDONLY, 0)) == -1) {
|
||||||
perror(name);
|
perror(name);
|
||||||
prg_exit(EXIT_FAILURE);
|
prg_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
@ -2707,12 +2707,12 @@ static int safe_open(const char *name)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
fd = open64(name, O_WRONLY | O_CREAT, 0644);
|
fd = open(name, O_WRONLY | O_CREAT, 0644);
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
if (errno != ENOENT || !use_strftime)
|
if (errno != ENOENT || !use_strftime)
|
||||||
return -1;
|
return -1;
|
||||||
if (create_path(name) == 0)
|
if (create_path(name) == 0)
|
||||||
fd = open64(name, O_WRONLY | O_CREAT, 0644);
|
fd = open(name, O_WRONLY | O_CREAT, 0644);
|
||||||
}
|
}
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue