Bug 24319 – OpenBSD: Use correct type for file_time

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Other
Creation time
2024-01-04T22:35:48Z
Last change time
2024-01-06T17:19:10Z
Keywords
pull
Assigned to
No Owner
Creator
Brian Callahan

Comments

Comment #0 by bcallah — 2024-01-04T22:35:48Z
In https://github.com/dlang/dmd/blob/master/compiler/src/dmd/libmach.d#L488, file_time is a c_long. However, in https://github.com/dlang/dmd/blob/master/compiler/src/dmd/libmach.d#L228, it is assigned from a statbuf.st_ctime, which is a time_t and thus always long on OpenBSD. Fixing the type fixes the build on OpenBSD/i386.
Comment #1 by dlang-bot — 2024-01-04T22:59:49Z
@ibara created dlang/dmd pull request #15999 "Fix Issue 24319 - OpenBSD: Use correct type for file_time" fixing this issue: - Fix Issue 24319 - OpenBSD: Use correct type for file_time statbuf.st_ctime is always 64-bit on OpenBSD. https://github.com/dlang/dmd/pull/15999
Comment #2 by dlang-bot — 2024-01-06T17:19:10Z
dlang/dmd pull request #15999 "Fix Issue 24319 - OpenBSD: Use correct type for file_time" was merged into stable: - a298a4ba28e633fe9708836918a089261d535e01 by Brian Callahan: Fix Issue 24319 - OpenBSD: Use correct type for file_time statbuf.st_ctime is always 64-bit on OpenBSD. https://github.com/dlang/dmd/pull/15999