Commit d8958a54 authored by Kenton Varda's avatar Kenton Varda

si_addr_lsb is fairly new; only copy if defined.

parent c50dd602
...@@ -395,9 +395,11 @@ static siginfo_t toRegularSiginfo(const struct signalfd_siginfo& siginfo) { ...@@ -395,9 +395,11 @@ static siginfo_t toRegularSiginfo(const struct signalfd_siginfo& siginfo) {
#ifdef si_trapno #ifdef si_trapno
result.si_trapno = siginfo.ssi_trapno; result.si_trapno = siginfo.ssi_trapno;
#endif #endif
#ifdef si_addr_lsb
// ssi_addr_lsb is defined as coming immediately after ssi_addr in the kernel headers but // ssi_addr_lsb is defined as coming immediately after ssi_addr in the kernel headers but
// apparently the userspace headers were never updated. So we do a pointer hack. :( // apparently the userspace headers were never updated. So we do a pointer hack. :(
result.si_addr_lsb = *reinterpret_cast<const uint16_t*>(&siginfo.ssi_addr + 1); result.si_addr_lsb = *reinterpret_cast<const uint16_t*>(&siginfo.ssi_addr + 1);
#endif
break; break;
case SIGIO: case SIGIO:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment