diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-12-15 14:04:10 -0800 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2023-01-23 19:04:07 +0100 |
commit | 4e3843d0ed9ea7845f5570a1aca542995f91c232 (patch) | |
tree | 0c8c38d756d373f3a851ffe0ffe1e05b24dcabb4 /axfer/test | |
parent | deaa1635cc284ab7e7083b9ce7d25a49fd653626 (diff) | |
download | alsa-utils-4e3843d0ed9ea7845f5570a1aca542995f91c232.tar.gz |
aplay,axfer: Replace off64_t with off_t
Also replace lseek64 with lseek.
_FILE_OFFSET_BITS=64 is passed to needed platforms since configure uses
AC_SYS_LARGEFILE macro. Therefore off_t is already 64-bit and lseek is
same as lseek64.
Additionally this fixes buils with latest musl where these lfs64
functions are moved out from _GNU_SOURCE and under _LARGEFILE64_SOURCE
macro alone. This makes the builds fail on 32-bit platforms even though
default off_t on musl is 64-bit always.
Fixes: https://github.com/alsa-project/alsa-utils/pull/183
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'axfer/test')
-rw-r--r-- | axfer/test/container-test.c | 4 | ||||
-rw-r--r-- | axfer/test/mapper-test.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/axfer/test/container-test.c b/axfer/test/container-test.c index e5b62dd..45b6c6a 100644 --- a/axfer/test/container-test.c +++ b/axfer/test/container-test.c @@ -153,7 +153,7 @@ static int callback(struct test_generator *gen, snd_pcm_access_t access, for (i = 0; i < ARRAY_SIZE(entries); ++i) { int fd; - off64_t pos; + off_t pos; frames_per_second = entries[i]; @@ -172,7 +172,7 @@ static int callback(struct test_generator *gen, snd_pcm_access_t access, frames_per_second, frame_buffer, frame_count, trial->verbose); - pos = lseek64(fd, 0, SEEK_SET); + pos = lseek(fd, 0, SEEK_SET); if (pos < 0) { err = -errno; break; diff --git a/axfer/test/mapper-test.c b/axfer/test/mapper-test.c index 477871d..6a389e9 100644 --- a/axfer/test/mapper-test.c +++ b/axfer/test/mapper-test.c @@ -257,7 +257,7 @@ static int test_mapper(struct mapper_trial *trial, snd_pcm_access_t access, goto end; for (i = 0; i < cntr_count; ++i) { - off64_t pos = lseek64(cntr_fds[i], 0, SEEK_SET); + off_t pos = lseek(cntr_fds[i], 0, SEEK_SET); if (pos != 0) { err = -EIO; goto end; |