diff options
| author | CoprDistGit <infra@openeuler.org> | 2026-10-13 13:49:31 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2026-10-13 13:49:31 +0000 |
| commit | 65787c4834435b6d183557cd729f49f575b6e4f4 (patch) | |
| tree | 4d7a6b646565ec39c99480f5cd75ad393740bfb5 /zenoh-bridge-dds.spec | |
| parent | 487483482fe231eb3612ca41911326fb1c64cfb3 (diff) | |
automatic import of ros-humble-zenoh-bridge-ddsopeneuler24.03_LTS_SP3
Diffstat (limited to 'zenoh-bridge-dds.spec')
| -rw-r--r-- | zenoh-bridge-dds.spec | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/zenoh-bridge-dds.spec b/zenoh-bridge-dds.spec index ebb453e..13f9a7c 100644 --- a/zenoh-bridge-dds.spec +++ b/zenoh-bridge-dds.spec @@ -39,12 +39,15 @@ tar -xzf %{SOURCE1} # Patch bindgen 0.58.1: sanitize_name only replaces space/colon/dot, not # parentheses and slashes in unnamed enum type names from newer glibc headers # (e.g. confname.h), causing proc-macro2 panic "is not a valid Ident". +# Replace ALL non-identifier chars with "_" — use |c: char| explicit type +# annotation to avoid Rust E0282 "type annotations needed" (str::replace +# Pattern trait resolution ambiguity without explicit char type on closure). python3 - <<'PYEOF' import json, hashlib p = 'vendor/bindgen/src/ir/ty.rs' s = open(p).read() old = "name.replace(|c| c == ' ' || c == ':' || c == '.', \"_\")" -new = "name.replace(|c| !(c.is_alphanumeric() || c == '_'), \"_\")" +new = "name.replace(|c: char| !(c.is_alphanumeric() || c == '_'), \"_\")" assert old in s, "bindgen sanitize_name pattern not found" s = s.replace(old, new) open(p, 'w').write(s) |
