diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /vendor/linux-raw-sys | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/linux-raw-sys')
-rw-r--r-- | vendor/linux-raw-sys/.cargo-checksum.json | 2 | ||||
-rw-r--r-- | vendor/linux-raw-sys/Cargo.toml | 3 | ||||
-rw-r--r-- | vendor/linux-raw-sys/src/lib.rs | 53 |
3 files changed, 56 insertions, 2 deletions
diff --git a/vendor/linux-raw-sys/.cargo-checksum.json b/vendor/linux-raw-sys/.cargo-checksum.json index dd65e1f64..c03cdb88d 100644 --- a/vendor/linux-raw-sys/.cargo-checksum.json +++ b/vendor/linux-raw-sys/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CODE_OF_CONDUCT.md":"ccd9e538ce44713a2486cc8e4c01b8c8b846d1ccff15de728d8d6fa9a7f846cd","COPYRIGHT":"3290ae0fbc9ddb77d2239121d710f0bb9d31b3b4744e6d97fe01e652b4c1870b","Cargo.toml":"15440cfdb69f4c22285c54ce204f0cc682d8a66775837d1d7ba837f71ebf6a54","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-Apache-2.0_WITH_LLVM-exception":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","ORG_CODE_OF_CONDUCT.md":"a62b69bf86e605ee1bcbb2f0a12ba79e4cebb6983a7b6491949750aecc4f2178","README.md":"018c6f3402f53659e773ed3d9f7b340fb0f76cba6354c0f13705960a7ba23d61","src/aarch64/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/aarch64/general.rs":"9a13415e64cd991e52688dcfe05a265f74c528cadaa5ed5be1e4b323dfdce62d","src/aarch64/ioctl.rs":"723f963524494ecdc1e89ccdae22930e08103b15a54e1830647e5eab53f324ce","src/aarch64/netlink.rs":"e79e75c8c0c299020d9375dda2103ffca837f37a4814f25c3d6af6af1922958f","src/arm/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/arm/general.rs":"6fb927aa8fe794e4586e6e917f6c2f3ea22dd93fdc7326496aabf21a6a93093f","src/arm/ioctl.rs":"7dd20d0458d141bcc0c8b512bc116a6bbe8e44cdc53bb64fa7b708de1c86da0f","src/arm/netlink.rs":"6aaee90e508ddeaca3637291e9a12f4257f6d27e73c6eec11868d948e1e4c724","src/lib.rs":"9ffe12d7022e4260b831012e9495ec97f267a3a232a2a2e263b77c16a0e911d0","src/mips/errno.rs":"4e2c1dbfd013d8701edc010da77e36e0693c9d434ddaa68a299fd338cadb2c06","src/mips/general.rs":"3374e45bbcfb2f62f163fbff05d9b786a4fd036b9a4beb9671b14e865048a9e3","src/mips/ioctl.rs":"84350b09b48effd8658c0cb455d158d40560e1480588843b92be4ad2c539141e","src/mips/netlink.rs":"3acc8c5156e550a2d7c299919cdabb75e4225f450df765c447bcbc89323cc463","src/mips64/errno.rs":"4e2c1dbfd013d8701edc010da77e36e0693c9d434ddaa68a299fd338cadb2c06","src/mips64/general.rs":"22c331bad3f75baea83a5eea5211318ff5979be2a4401f7dd826d8dd2adfc254","src/mips64/ioctl.rs":"efa0a37a086ff4dff1889acdd728edd54f31b0ba389b54af7dd70279a9429537","src/mips64/netlink.rs":"9b92fff4ba43d4718cd1e880ccdfb25eb4a4d0b3136309cba9631e958187fd45","src/powerpc/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/powerpc/general.rs":"4ea12c0d6ad14f71291c688fbd78014e35ff3a4115155461fca5084960575de5","src/powerpc/ioctl.rs":"be402bfba0fd1014bc49648402f15aec5ad603e5991158db64ae07117eb60ffe","src/powerpc/netlink.rs":"745a7256254b0153b4aaf8c2fc5371aaca6d79666fddc5f539edc4c4e6cc1fcd","src/powerpc64/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/powerpc64/general.rs":"7cc72131ebb7736700500148e776e221619f89ecdf119207d7f8a24171810525","src/powerpc64/ioctl.rs":"be402bfba0fd1014bc49648402f15aec5ad603e5991158db64ae07117eb60ffe","src/powerpc64/netlink.rs":"b7be2f1ae16cc6b360d3865fc786188f0c820f48ac8923db5eed538f44c66793","src/riscv32/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/riscv32/general.rs":"47740516fd13af34216fca38a9be1eb3d46739e16cfbcd607d0c142c72b3f21e","src/riscv32/ioctl.rs":"33ce4abc4d6893d1c93485eea3159bc8cefff945d09de7d530ca7b6e99da0097","src/riscv32/netlink.rs":"1b08bd4b65b500b34b72e5b7cf4738b7529be1fb38096bb75299e228ab1f22f6","src/riscv64/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/riscv64/general.rs":"65714484bd8a745c23f6bab9dc9546a99ef2974c80afc9e7a430b92ad1e2b08d","src/riscv64/ioctl.rs":"935141f7bc36e4d2c6c6be38aa42026a747f0bfc72bbfcc7cda3a9c540151470","src/riscv64/netlink.rs":"8b73509c05aaace7619168ecf6b128e4ca6db7f5bd3eb33994a2b57e8b9e0344","src/s390x/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/s390x/general.rs":"499eac9bc32a159a6f99371250d32d03ec22c16d357702dde133174478a850ff","src/s390x/ioctl.rs":"33ce4abc4d6893d1c93485eea3159bc8cefff945d09de7d530ca7b6e99da0097","src/s390x/netlink.rs":"25f47d91f9b1a71f4a33543ddcf6823c7c94e95c2f82587f5bbd9d1a892d61f4","src/sparc/errno.rs":"41ed2550f56eab092ceeed642290811c05f48be68cd557dc3020c7fb4a92b877","src/sparc/general.rs":"7a2e95915edd5207ef0de9dc524e38bc51a93c48d14275f88cb27664c8329a03","src/sparc/ioctl.rs":"33ce4abc4d6893d1c93485eea3159bc8cefff945d09de7d530ca7b6e99da0097","src/sparc/netlink.rs":"b9a608f050677cd7cebcb832705935fa8c79858870c82a12c4fda4edf2f1023a","src/sparc64/errno.rs":"41ed2550f56eab092ceeed642290811c05f48be68cd557dc3020c7fb4a92b877","src/sparc64/general.rs":"06cea8ae67e9f07c99dd2556a5ac7dc3c963dce1fa317fe396c53caf5b2db65b","src/sparc64/ioctl.rs":"33ce4abc4d6893d1c93485eea3159bc8cefff945d09de7d530ca7b6e99da0097","src/sparc64/netlink.rs":"2e718411da2f58aa8bab75b384de38b778c4bea25d3065210bc5e78b7cdde2e8","src/x32/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/x32/general.rs":"b5189e62ee69bc605570804495e4c0cc793498f1002fdc80c135e00afa53c6ce","src/x32/ioctl.rs":"85e548f8536204552b5b23fb8b3bfeade961fc73c41a9691156012304e0dd84c","src/x32/netlink.rs":"275a7694600599f6856a2606133bd9c203261f164d9153cd0cd8c253a6428769","src/x86/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/x86/general.rs":"89186979648bde769f128ab85a864188b5ca65b99803c8ee1f834302bb42317c","src/x86/ioctl.rs":"6238356fcad51581c1bfaac29ca6b418a7cb0a0a37692cbd0d370a42890fd319","src/x86/netlink.rs":"6aaee90e508ddeaca3637291e9a12f4257f6d27e73c6eec11868d948e1e4c724","src/x86_64/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/x86_64/general.rs":"9150b5bbac59f17eb59505a0effe7ec0043a47f97f3124b5377a10422a28e80f","src/x86_64/ioctl.rs":"85e548f8536204552b5b23fb8b3bfeade961fc73c41a9691156012304e0dd84c","src/x86_64/netlink.rs":"fa40e0f28bb09540e219ac6a5f31f50efdc770aa70704a809827dae6a4573885"},"package":"8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f"}
\ No newline at end of file +{"files":{"CODE_OF_CONDUCT.md":"ccd9e538ce44713a2486cc8e4c01b8c8b846d1ccff15de728d8d6fa9a7f846cd","COPYRIGHT":"3290ae0fbc9ddb77d2239121d710f0bb9d31b3b4744e6d97fe01e652b4c1870b","Cargo.toml":"f09fb593f5ffe340754c48be1d18e84ebb68aec0a870a6679b4d353d34639e75","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-Apache-2.0_WITH_LLVM-exception":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","ORG_CODE_OF_CONDUCT.md":"a62b69bf86e605ee1bcbb2f0a12ba79e4cebb6983a7b6491949750aecc4f2178","README.md":"018c6f3402f53659e773ed3d9f7b340fb0f76cba6354c0f13705960a7ba23d61","src/aarch64/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/aarch64/general.rs":"9a13415e64cd991e52688dcfe05a265f74c528cadaa5ed5be1e4b323dfdce62d","src/aarch64/ioctl.rs":"723f963524494ecdc1e89ccdae22930e08103b15a54e1830647e5eab53f324ce","src/aarch64/netlink.rs":"e79e75c8c0c299020d9375dda2103ffca837f37a4814f25c3d6af6af1922958f","src/arm/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/arm/general.rs":"6fb927aa8fe794e4586e6e917f6c2f3ea22dd93fdc7326496aabf21a6a93093f","src/arm/ioctl.rs":"7dd20d0458d141bcc0c8b512bc116a6bbe8e44cdc53bb64fa7b708de1c86da0f","src/arm/netlink.rs":"6aaee90e508ddeaca3637291e9a12f4257f6d27e73c6eec11868d948e1e4c724","src/lib.rs":"b41bc02b8eede907dc4381805eae16ccda7857082f2b6547c0e55775018de687","src/mips/errno.rs":"4e2c1dbfd013d8701edc010da77e36e0693c9d434ddaa68a299fd338cadb2c06","src/mips/general.rs":"3374e45bbcfb2f62f163fbff05d9b786a4fd036b9a4beb9671b14e865048a9e3","src/mips/ioctl.rs":"84350b09b48effd8658c0cb455d158d40560e1480588843b92be4ad2c539141e","src/mips/netlink.rs":"3acc8c5156e550a2d7c299919cdabb75e4225f450df765c447bcbc89323cc463","src/mips64/errno.rs":"4e2c1dbfd013d8701edc010da77e36e0693c9d434ddaa68a299fd338cadb2c06","src/mips64/general.rs":"22c331bad3f75baea83a5eea5211318ff5979be2a4401f7dd826d8dd2adfc254","src/mips64/ioctl.rs":"efa0a37a086ff4dff1889acdd728edd54f31b0ba389b54af7dd70279a9429537","src/mips64/netlink.rs":"9b92fff4ba43d4718cd1e880ccdfb25eb4a4d0b3136309cba9631e958187fd45","src/powerpc/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/powerpc/general.rs":"4ea12c0d6ad14f71291c688fbd78014e35ff3a4115155461fca5084960575de5","src/powerpc/ioctl.rs":"be402bfba0fd1014bc49648402f15aec5ad603e5991158db64ae07117eb60ffe","src/powerpc/netlink.rs":"745a7256254b0153b4aaf8c2fc5371aaca6d79666fddc5f539edc4c4e6cc1fcd","src/powerpc64/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/powerpc64/general.rs":"7cc72131ebb7736700500148e776e221619f89ecdf119207d7f8a24171810525","src/powerpc64/ioctl.rs":"be402bfba0fd1014bc49648402f15aec5ad603e5991158db64ae07117eb60ffe","src/powerpc64/netlink.rs":"b7be2f1ae16cc6b360d3865fc786188f0c820f48ac8923db5eed538f44c66793","src/riscv32/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/riscv32/general.rs":"47740516fd13af34216fca38a9be1eb3d46739e16cfbcd607d0c142c72b3f21e","src/riscv32/ioctl.rs":"33ce4abc4d6893d1c93485eea3159bc8cefff945d09de7d530ca7b6e99da0097","src/riscv32/netlink.rs":"1b08bd4b65b500b34b72e5b7cf4738b7529be1fb38096bb75299e228ab1f22f6","src/riscv64/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/riscv64/general.rs":"65714484bd8a745c23f6bab9dc9546a99ef2974c80afc9e7a430b92ad1e2b08d","src/riscv64/ioctl.rs":"935141f7bc36e4d2c6c6be38aa42026a747f0bfc72bbfcc7cda3a9c540151470","src/riscv64/netlink.rs":"8b73509c05aaace7619168ecf6b128e4ca6db7f5bd3eb33994a2b57e8b9e0344","src/s390x/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/s390x/general.rs":"499eac9bc32a159a6f99371250d32d03ec22c16d357702dde133174478a850ff","src/s390x/ioctl.rs":"33ce4abc4d6893d1c93485eea3159bc8cefff945d09de7d530ca7b6e99da0097","src/s390x/netlink.rs":"25f47d91f9b1a71f4a33543ddcf6823c7c94e95c2f82587f5bbd9d1a892d61f4","src/sparc/errno.rs":"41ed2550f56eab092ceeed642290811c05f48be68cd557dc3020c7fb4a92b877","src/sparc/general.rs":"7a2e95915edd5207ef0de9dc524e38bc51a93c48d14275f88cb27664c8329a03","src/sparc/ioctl.rs":"33ce4abc4d6893d1c93485eea3159bc8cefff945d09de7d530ca7b6e99da0097","src/sparc/netlink.rs":"b9a608f050677cd7cebcb832705935fa8c79858870c82a12c4fda4edf2f1023a","src/sparc64/errno.rs":"41ed2550f56eab092ceeed642290811c05f48be68cd557dc3020c7fb4a92b877","src/sparc64/general.rs":"06cea8ae67e9f07c99dd2556a5ac7dc3c963dce1fa317fe396c53caf5b2db65b","src/sparc64/ioctl.rs":"33ce4abc4d6893d1c93485eea3159bc8cefff945d09de7d530ca7b6e99da0097","src/sparc64/netlink.rs":"2e718411da2f58aa8bab75b384de38b778c4bea25d3065210bc5e78b7cdde2e8","src/x32/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/x32/general.rs":"b5189e62ee69bc605570804495e4c0cc793498f1002fdc80c135e00afa53c6ce","src/x32/ioctl.rs":"85e548f8536204552b5b23fb8b3bfeade961fc73c41a9691156012304e0dd84c","src/x32/netlink.rs":"275a7694600599f6856a2606133bd9c203261f164d9153cd0cd8c253a6428769","src/x86/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/x86/general.rs":"89186979648bde769f128ab85a864188b5ca65b99803c8ee1f834302bb42317c","src/x86/ioctl.rs":"6238356fcad51581c1bfaac29ca6b418a7cb0a0a37692cbd0d370a42890fd319","src/x86/netlink.rs":"6aaee90e508ddeaca3637291e9a12f4257f6d27e73c6eec11868d948e1e4c724","src/x86_64/errno.rs":"fff6de3b7ed5b73adfd52c3d27d4603340b7a36aea4736b8bd9cdd4c5b982d55","src/x86_64/general.rs":"9150b5bbac59f17eb59505a0effe7ec0043a47f97f3124b5377a10422a28e80f","src/x86_64/ioctl.rs":"85e548f8536204552b5b23fb8b3bfeade961fc73c41a9691156012304e0dd84c","src/x86_64/netlink.rs":"fa40e0f28bb09540e219ac6a5f31f50efdc770aa70704a809827dae6a4573885"},"package":"f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"}
\ No newline at end of file diff --git a/vendor/linux-raw-sys/Cargo.toml b/vendor/linux-raw-sys/Cargo.toml index 7e3a235aa..00b662095 100644 --- a/vendor/linux-raw-sys/Cargo.toml +++ b/vendor/linux-raw-sys/Cargo.toml @@ -11,8 +11,9 @@ [package] edition = "2018" +rust-version = "1.48" name = "linux-raw-sys" -version = "0.1.3" +version = "0.1.4" authors = ["Dan Gohman <dev@sunfishcode.online>"] exclude = [ "/gen", diff --git a/vendor/linux-raw-sys/src/lib.rs b/vendor/linux-raw-sys/src/lib.rs index 199cddefa..3204531d0 100644 --- a/vendor/linux-raw-sys/src/lib.rs +++ b/vendor/linux-raw-sys/src/lib.rs @@ -78,6 +78,59 @@ impl PartialEq for general::__kernel_timespec { #[cfg(feature = "general")] impl Eq for general::__kernel_timespec {} +#[cfg(feature = "general")] +pub mod cmsg_macros { + use crate::ctypes::{c_long, c_uint, c_uchar}; + use crate::general::{cmsghdr, msghdr}; + use core::mem::size_of; + use core::ptr; + + pub unsafe fn CMSG_ALIGN(len: c_uint) -> c_uint { + let c_long_size = size_of::<c_long>() as c_uint; + (len + c_long_size - 1) & !(c_long_size - 1) + } + + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + (cmsg as *mut c_uchar).offset(size_of::<cmsghdr>() as isize) + } + + pub unsafe fn CMSG_SPACE(len: c_uint) -> c_uint { + size_of::<cmsghdr>() as c_uint + CMSG_ALIGN(len) + } + + pub unsafe fn CMSG_LEN(len: c_uint) -> c_uint { + size_of::<cmsghdr>() as c_uint + len + } + + pub unsafe fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { + if (*mhdr).msg_controllen < size_of::<cmsghdr>() as _ { + return ptr::null_mut(); + } + + (*mhdr).msg_control as *mut cmsghdr + } + + pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + // We convert from raw pointers to isize here, which may not be sound in a future version of Rust. + // Once the provenance rules are set in stone, it will be a good idea to give this function a once-over. + + let cmsg_len = (*cmsg).cmsg_len; + let next_cmsg = (cmsg as *mut u8).offset(CMSG_ALIGN(cmsg_len as _) as isize) as *mut cmsghdr; + let max = ((*mhdr).msg_control as usize) + ((*mhdr).msg_controllen as usize); + + if cmsg_len < size_of::<cmsghdr>() as _ { + return ptr::null_mut(); + } + + if next_cmsg.offset(1) as usize > max || next_cmsg as usize + CMSG_ALIGN(cmsg_len as _) as usize > max + { + return ptr::null_mut(); + } + + next_cmsg + } +} + // The rest of this file is auto-generated! #[cfg(feature = "errno")] #[cfg(target_arch = "arm")] |