summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-02-25 00:37:10 +0100
committerLinus Färnstrand <linus@mullvad.net>2018-02-25 02:05:28 +0100
commit95befb4b20b39d2b257ed69a10a22ab68995fc12 (patch)
tree73b5fd642b806e8055764c55f5dfabb322850d0a
parentfe499944e7bff06202cf0d5f08761539cefaa65b (diff)
downloadrust-libc-95befb4b20b39d2b257ed69a10a22ab68995fc12.tar.gz
Bump NFT_*_MAXNAMELEN to 256
-rw-r--r--src/unix/notbsd/linux/other/mod.rs19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs
index ab3b7cfa3c..f842d3f3db 100644
--- a/src/unix/notbsd/linux/other/mod.rs
+++ b/src/unix/notbsd/linux/other/mod.rs
@@ -625,13 +625,22 @@ pub const NFPROTO_IPV6: ::c_int = 10;
pub const NFPROTO_DECNET: ::c_int = 12;
pub const NFPROTO_NUMPROTO: ::c_int = 13;
-pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
-pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
-pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
-cfg_if! {
- if #[cfg(not(target_arch = "sparc64"))] {
+cfg_if!{
+ if #[cfg(any(target_arch = "arm", target_arch = "powerpc",
+ target_arch = "powerpc64", target_arch = "aarch64"))] {
+ pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
+ pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
+ pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
pub const NFT_OBJ_MAXNAMELEN: ::c_int = 32;
+ } else if #[cfg(target_arch = "sparc64")] {
+ pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
+ pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
+ pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
} else {
+ pub const NFT_TABLE_MAXNAMELEN: ::c_int = 256;
+ pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 256;
+ pub const NFT_SET_MAXNAMELEN: ::c_int = 256;
+ pub const NFT_OBJ_MAXNAMELEN: ::c_int = 256;
}
}
pub const NFT_USERDATA_MAXLEN: ::c_int = 256;