Opened 12 years ago

Closed 12 years ago

#2833 closed Bug (fixed)

LP64 bug on OpenBSD

Reported by: naddy Owned by: charles
Priority: Normal Milestone: 1.90
Component: libtransmission Version: 1.82
Severity: Normal Keywords: backport-1.8x


This is a bit tricky.

(1) At some point, POSIX must have retconned the tv_sec element of a struct timeval to be of type time_t. OpenBSD still uses the traditional BSD definition, which has tv_sec as a long.

(2) On OpenBSD's 64-bit platforms, time_t is not long, but int.

In combination, dereferencing (time_t *)&timeval.tv_sec will cause unhappiness. You might even get lucky on 64-bit little-endian machines, but not on big-endian ones (such as sparc64). This might affect some other operating systems as well, but the circumstances are fairly specific.

Attachments (1)

patch-libtransmission_utils_c (637 bytes) - added by naddy 12 years ago.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by naddy

comment:1 Changed 12 years ago by charles

  • Component changed from Transmission to libtransmission
  • Keywords backport-1.8x added
  • Milestone changed from None Set to 1.90
  • Owner set to charles
  • Status changed from new to assigned

Thanks for the patch Naddy.

Fixed in trunk for 1.90 by r10044, and marking as a backport candidate if/when we do another 1.8x release.

comment:2 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.