From 8592ff9492319ae6a005c3d44119c815eb5d229a Mon Sep 17 00:00:00 2001 From: Jukka Taimisto Date: Sun, 8 Dec 2024 22:45:27 +0200 Subject: [PATCH] Lift IFA_* constants from linux/gnu to linux (backport ) (cherry picked from commit 70c1e823ef4faf5a77202bb01698da2a2b1c216a) --- libc-test/semver/linux-gnu.txt | 6 ------ libc-test/semver/linux.txt | 6 ++++++ src/unix/linux_like/linux/gnu/mod.rs | 8 -------- src/unix/linux_like/linux/mod.rs | 5 +++++ 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/libc-test/semver/linux-gnu.txt b/libc-test/semver/linux-gnu.txt index 83dd825584cd0..a6d6b6bf59d88 100644 --- a/libc-test/semver/linux-gnu.txt +++ b/libc-test/semver/linux-gnu.txt @@ -78,12 +78,6 @@ HUGETLB_FLAG_ENCODE_64KB HUGETLB_FLAG_ENCODE_8MB HUGETLB_FLAG_ENCODE_MASK HUGETLB_FLAG_ENCODE_SHIFT -IFA_FLAGS -IFA_F_MANAGETEMPADDR -IFA_F_MCAUTOJOIN -IFA_F_NODAD -IFA_F_NOPREFIXROUTE -IFA_F_STABLE_PRIVACY INIT_PROCESS ISOFS_SUPER_MAGIC JFFS2_SUPER_MAGIC diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt index 441a675725483..175e2811e9649 100644 --- a/libc-test/semver/linux.txt +++ b/libc-test/semver/linux.txt @@ -923,12 +923,18 @@ IFA_ADDRESS IFA_ANYCAST IFA_BROADCAST IFA_CACHEINFO +IFA_FLAGS IFA_F_DADFAILED IFA_F_DEPRECATED IFA_F_HOMEADDRESS +IFA_F_MANAGETEMPADDR +IFA_F_MCAUTOJOIN +IFA_F_NODAD +IFA_F_NOPREFIXROUTE IFA_F_OPTIMISTIC IFA_F_PERMANENT IFA_F_SECONDARY +IFA_F_STABLE_PRIVACY IFA_F_TEMPORARY IFA_F_TENTATIVE IFA_LABEL diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index 948ec35f36b0d..0d0278de2c8b3 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -1035,14 +1035,6 @@ pub const NDA_SRC_VNI: c_ushort = 11; pub const UNAME26: c_int = 0x0020000; pub const FDPIC_FUNCPTRS: c_int = 0x0080000; -// linux/if_addr.h -pub const IFA_FLAGS: c_ushort = 8; - -pub const IFA_F_MANAGETEMPADDR: u32 = 0x100; -pub const IFA_F_NOPREFIXROUTE: u32 = 0x200; -pub const IFA_F_MCAUTOJOIN: u32 = 0x400; -pub const IFA_F_STABLE_PRIVACY: u32 = 0x800; - pub const MAX_LINKS: c_int = 32; pub const GENL_UNS_ADMIN_PERM: c_int = 0x10; diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 68f3fa5c37ff9..e01a4d67e91ec 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -2768,6 +2768,7 @@ pub const IFA_BROADCAST: c_ushort = 4; pub const IFA_ANYCAST: c_ushort = 5; pub const IFA_CACHEINFO: c_ushort = 6; pub const IFA_MULTICAST: c_ushort = 7; +pub const IFA_FLAGS: c_ushort = 8; pub const IFA_F_SECONDARY: u32 = 0x01; pub const IFA_F_TEMPORARY: u32 = 0x01; @@ -2778,6 +2779,10 @@ pub const IFA_F_HOMEADDRESS: u32 = 0x10; pub const IFA_F_DEPRECATED: u32 = 0x20; pub const IFA_F_TENTATIVE: u32 = 0x40; pub const IFA_F_PERMANENT: u32 = 0x80; +pub const IFA_F_MANAGETEMPADDR: u32 = 0x100; +pub const IFA_F_NOPREFIXROUTE: u32 = 0x200; +pub const IFA_F_MCAUTOJOIN: u32 = 0x400; +pub const IFA_F_STABLE_PRIVACY: u32 = 0x800; // linux/if_link.h pub const IFLA_UNSPEC: c_ushort = 0;