Skip to content

Commit

Permalink
8273606: Zero: SPARC64 build fails with si_band type mismatch
Browse files Browse the repository at this point in the history
Reviewed-by: clanger
Backport-of: 241ac89f120f9bcfef65962aa05b51b9f847c4ce
  • Loading branch information
shipilev committed Oct 6, 2021
1 parent 5865def commit 2897522
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hotspot/os/posix/os_posix.cpp
Expand Up @@ -1362,7 +1362,11 @@ void os::print_siginfo(outputStream* os, const void* si0) {
os->print(", si_addr: " PTR_FORMAT, p2i(si->si_addr));
#ifdef SIGPOLL
} else if (sig == SIGPOLL) {
os->print(", si_band: %ld", si->si_band);
// siginfo_t.si_band is defined as "long", and it is so in most
// implementations. But SPARC64 glibc has a bug: si_band is "int".
// Cast si_band to "long" to prevent format specifier mismatch.
// See: https://sourceware.org/bugzilla/show_bug.cgi?id=23821
os->print(", si_band: %ld", (long) si->si_band);
#endif
}

Expand Down

1 comment on commit 2897522

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.