mirror of
https://git.proxmox.com/git/rustc
synced 2026-01-18 04:29:29 +00:00
Add a work-around for some Debian porterboxes
This commit is contained in:
parent
4e05a94e11
commit
3718c49763
29
debian/patches/d-host-duplicates.patch
vendored
Normal file
29
debian/patches/d-host-duplicates.patch
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
Description: Work around #842634 on some machines, e.g. Debian porterboxes
|
||||
This should remain commented-out in debian/patches/series, it's not needed everywhere
|
||||
Author: Ximin Luo <infinity0@debian.org>
|
||||
Forwarded: not-needed
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- a/src/libstd/sys_common/net.rs
|
||||
+++ b/src/libstd/sys_common/net.rs
|
||||
@@ -616,20 +616,3 @@
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
-
|
||||
-#[cfg(test)]
|
||||
-mod tests {
|
||||
- use super::*;
|
||||
- use collections::HashMap;
|
||||
-
|
||||
- #[test]
|
||||
- fn no_lookup_host_duplicates() {
|
||||
- let mut addrs = HashMap::new();
|
||||
- let lh = match lookup_host("localhost") {
|
||||
- Ok(lh) => lh,
|
||||
- Err(e) => panic!("couldn't resolve `localhost': {}", e)
|
||||
- };
|
||||
- let _na = lh.map(|sa| *addrs.entry(sa).or_insert(0) += 1).count();
|
||||
- assert!(addrs.values().filter(|&&v| v > 1).count() == 0);
|
||||
- }
|
||||
-}
|
||||
3
debian/patches/series
vendored
3
debian/patches/series
vendored
@ -27,3 +27,6 @@ d-dynamic-link-llvm.patch
|
||||
d-use-system-jquery.patch
|
||||
d-no-web-dependencies-in-doc.patch
|
||||
d-cross-compile-install.patch
|
||||
|
||||
# Work around for some porterboxes, keep this commented
|
||||
#d-host-duplicates.patch
|
||||
|
||||
2
debian/rules
vendored
2
debian/rules
vendored
@ -125,6 +125,8 @@ override_dh_auto_configure: debian/config.toml
|
||||
! grep --color=always -i 'll...?$(OLD_LLVM_VERSION)' --exclude=changelog -R debian
|
||||
$(PRECONFIGURE_CHECK)
|
||||
if [ -d stage0 ]; then mkdir -p build && ln -sfT ../stage0 build/cache; fi
|
||||
# avoid having to do this manually all the time
|
||||
if [ -n "$(shell grep "Debian .*porterbox" /etc/motd)" ]; then debian/ensure-patch -N debian/patches/d-host-duplicates.patch; fi
|
||||
PATH="$$PWD/debian/bin:$$PATH" \
|
||||
./configure $(DEB_CONFIGURE_FLAGS)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user