Skip to content

Commit 72f49c9

Browse files
committed
hurd: Fix build from missing fpos_t
In 872642a ("gnu: Add proper structs for fpos_t and fpos64_t"), `fpos_t` was changed from an opaque struct to one with a definition on Linux GNU, with the Unix fallback configured as for targets without a GNU `target_env`. However, GNU hurd matches `target_env = "gnu"`, but doesn't have a `fpos` implementation. Fix the build by adjusting the fallback `cfg` to be more specific. Eventually we probably want the same definition on Hurd as on Linux.
1 parent 2324acf commit 72f49c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/unix/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ cfg_if! {
567567
}
568568

569569
cfg_if! {
570-
if #[cfg(not(target_env = "gnu"))] {
570+
if #[cfg(not(all(target_os = "linux", target_env = "gnu")))] {
571571
missing! {
572572
#[cfg_attr(feature = "extra_traits", derive(Debug))]
573573
pub enum fpos_t {} // FIXME(unix): fill this out with a struct

0 commit comments

Comments
 (0)