Skip to content

Commit 99c4449

Browse files
authored
Rollup merge of #151094 - nicholasbishop:bishop-fix-server-uefi-compilation, r=Mark-Simulacrum
remote-test-server: Fix compilation on UEFI targets Tested with: ./x build src/tools/remote-test-server --target x86_64-unknown-uefi
2 parents fd5f48f + 795745c commit 99c4449

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • src/tools/remote-test-server/src

src/tools/remote-test-server/src/main.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
//! themselves having support libraries. All data over the TCP sockets is in a
1111
//! basically custom format suiting our needs.
1212
13-
#[cfg(all(not(windows), not(target_os = "motor")))]
13+
#[cfg(not(any(windows, target_os = "motor", target_os = "uefi")))]
1414
use std::fs::Permissions;
1515
use std::fs::{self, File};
1616
use std::io::prelude::*;
1717
use std::io::{self, BufReader};
1818
use std::net::{SocketAddr, TcpListener, TcpStream};
19-
#[cfg(all(not(windows), not(target_os = "motor")))]
19+
#[cfg(not(any(windows, target_os = "motor", target_os = "uefi")))]
2020
use std::os::unix::prelude::*;
2121
use std::path::{Path, PathBuf};
2222
use std::process::{Command, ExitStatus, Stdio};
@@ -325,15 +325,15 @@ fn handle_run(socket: TcpStream, work: &Path, tmp: &Path, lock: &Mutex<()>, conf
325325
]));
326326
}
327327

328-
#[cfg(all(not(windows), not(target_os = "motor")))]
328+
#[cfg(not(any(windows, target_os = "motor", target_os = "uefi")))]
329329
fn get_status_code(status: &ExitStatus) -> (u8, i32) {
330330
match status.code() {
331331
Some(n) => (0, n),
332332
None => (1, status.signal().unwrap()),
333333
}
334334
}
335335

336-
#[cfg(any(windows, target_os = "motor"))]
336+
#[cfg(any(windows, target_os = "motor", target_os = "uefi"))]
337337
fn get_status_code(status: &ExitStatus) -> (u8, i32) {
338338
(0, status.code().unwrap())
339339
}
@@ -359,11 +359,11 @@ fn recv<B: BufRead>(dir: &Path, io: &mut B) -> PathBuf {
359359
dst
360360
}
361361

362-
#[cfg(all(not(windows), not(target_os = "motor")))]
362+
#[cfg(not(any(windows, target_os = "motor", target_os = "uefi")))]
363363
fn set_permissions(path: &Path) {
364364
t!(fs::set_permissions(&path, Permissions::from_mode(0o755)));
365365
}
366-
#[cfg(any(windows, target_os = "motor"))]
366+
#[cfg(any(windows, target_os = "motor", target_os = "uefi"))]
367367
fn set_permissions(_path: &Path) {}
368368

369369
fn my_copy(src: &mut dyn Read, which: u8, dst: &Mutex<dyn Write>) {

0 commit comments

Comments
 (0)