Skip to content

Commit

Permalink
Fix compile failures
Browse files Browse the repository at this point in the history
  • Loading branch information
thomcc committed Jul 18, 2023
1 parent f57785d commit 4369724
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
- 1.67.1
- rust-1.69.0
- rust-1.70.0
- rust-1.71.0
pull_request:
branches:
- 1.67.1
- rust-1.69.0
- rust-1.70.0
- rust-1.71.0

jobs:
test_x86_84:
Expand Down Expand Up @@ -112,7 +114,7 @@ jobs:
export RUSTUP_HOME="$HOME/.rustup"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustup toolchain install 1.70.0
rustup toolchain install 1.71.0
cargo --version
- name: Print env
Expand Down
2 changes: 2 additions & 0 deletions library/std/src/sys/postgres/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ pub struct FileTimes();
impl FileTimes {
pub fn set_accessed(&mut self, _t: SystemTime) {}
pub fn set_modified(&mut self, _t: SystemTime) {}
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))]
pub fn set_created(&mut self, t: SystemTime) {}
}

pub struct ReadDir(!);
Expand Down
2 changes: 2 additions & 0 deletions library/std/src/sys/postgres/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ pub mod thread;
#[cfg(target_thread_local)]
pub mod thread_local_dtor;
pub mod thread_local_key;
#[path = "../unix/thread_parking/mod.rs"]
pub mod thread_parking;
pub mod time;

mod common;
Expand Down
4 changes: 4 additions & 0 deletions library/std/src/sys/postgres/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ use crate::prelude::rust_2021::*;
use crate::sys::cvt_unsup;
use crate::time::Duration;

#[allow(dead_code)]
pub const TIMESPEC_MAX: libc::timespec =
libc::timespec { tv_sec: <libc::time_t>::MAX, tv_nsec: 1_000_000_000 - 1 };

const NSEC_PER_SEC: u64 = 1_000_000_000;

#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
Expand Down
21 changes: 12 additions & 9 deletions library/std/src/sys/unix/thread_parking/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
//! Thread parking on systems without futex support.

#![cfg(not(any(
target_os = "linux",
target_os = "android",
all(target_os = "emscripten", target_feature = "atomics"),
target_os = "freebsd",
target_os = "openbsd",
target_os = "dragonfly",
target_os = "fuchsia",
)))]
#![cfg(any(
target_family = "postgres",
not(any(
target_os = "linux",
target_os = "android",
all(target_os = "emscripten", target_feature = "atomics"),
target_os = "freebsd",
target_os = "openbsd",
target_os = "dragonfly",
target_os = "fuchsia",
))
))]

cfg_if::cfg_if! {
if #[cfg(all(
Expand Down
4 changes: 2 additions & 2 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ run_build() {
RUSTC_BOOTSTRAP=1 \
RUSTFLAGS="-Cforce-unwind-tables=yes -Cembed-bitcode=yes -Aunused-unsafe -Aunused-imports" \
__CARGO_DEFAULT_LIB_METADATA="postgrestd" \
cargo "${CARGO_CMD}" \
cargo build "${CARGO_CMD}" \
--target "${target}" \
-Zbinary-dep-depinfo \
--release \
--features "compiler-builtins-mem" \
--manifest-path "library/test/Cargo.toml"
--manifest-path "library/sysroot/Cargo.toml"
done
}

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.70.0"
channel = "1.71.0"
components = [ "rustfmt" ]
targets = [ ]
profile = "minimal"

0 comments on commit 4369724

Please sign in to comment.