Skip to content

Commit 34d6637

Browse files
devnexentgross35
authored andcommitted
1 parent c20475c commit 34d6637

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

libc-test/semver/linux-gnu.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ STA_PPSWANDER
451451
STA_RONLY
452452
STA_UNSYNC
453453
ST_RELATIME
454+
SUN_LEN
454455
SYSFS_MAGIC
455456
TCA_CHAIN
456457
TCA_DUMP_INVISIBLE

libc-test/semver/linux-musl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ RWF_HIPRI
3838
RWF_NOAPPEND
3939
RWF_NOWAIT
4040
RWF_SYNC
41+
SUN_LEN
4142
USER_PROCESS
4243
UT_HOSTSIZE
4344
UT_LINESIZE

src/unix/linux_like/linux/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5618,6 +5618,16 @@ f! {
56185618
pub fn ELF64_R_INFO(sym: Elf64_Xword, t: Elf64_Xword) -> Elf64_Xword {
56195619
sym << (32 + t)
56205620
}
5621+
5622+
#[cfg(target_env = "gnu")]
5623+
pub fn SUN_LEN(s: crate::sockaddr_un) -> usize {
5624+
offset_of!(crate::sockaddr_un, sun_path) + crate::strlen(s.sun_path.as_ptr())
5625+
}
5626+
5627+
#[cfg(target_env = "musl")]
5628+
pub fn SUN_LEN(s: crate::sockaddr_un) -> usize {
5629+
2 * crate::strlen(s.sun_path.as_ptr())
5630+
}
56215631
}
56225632

56235633
safe_f! {

0 commit comments

Comments
 (0)