Skip to content

Commit

Permalink
Fix a build on alpine, whose libc is musl (bytecodealliance#726)
Browse files Browse the repository at this point in the history
Change __syscall_slong_t to __SYSCALL_SLONG_TYPE, and use it when macro __SYSCALL_SLONG_TYPE is defined.
  • Loading branch information
yamt authored Sep 7, 2021
1 parent 79f163d commit 336abc2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2160,8 +2160,8 @@ static void convert_timestamp(
struct timespec *out
) {
// Store sub-second remainder.
#ifndef __APPLE__
out->tv_nsec = (__syscall_slong_t)(in % 1000000000);
#if defined(__SYSCALL_SLONG_TYPE)
out->tv_nsec = (__SYSCALL_SLONG_TYPE)(in % 1000000000);
#else
out->tv_nsec = (long)(in % 1000000000);
#endif
Expand Down

0 comments on commit 336abc2

Please sign in to comment.