Skip to content

Commit 7ecea9a

Browse files
committed
Auto merge of #2808 - devnexen:linux_somaxconn_rework, r=Amanieu
linux SOMAXCONN rework proposal. glibc had increased to 4096 since couple of years already.
2 parents f70d55b + cdd7181 commit 7ecea9a

File tree

6 files changed

+10
-2
lines changed

6 files changed

+10
-2
lines changed

src/unix/linux_like/android/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,6 +2489,8 @@ pub const AF_VSOCK: ::c_int = 40;
24892489
pub const PF_NFC: ::c_int = AF_NFC;
24902490
pub const PF_VSOCK: ::c_int = AF_VSOCK;
24912491

2492+
pub const SOMAXCONN: ::c_int = 128;
2493+
24922494
// sys/system_properties.h
24932495
pub const PROP_VALUE_MAX: ::c_int = 92;
24942496
pub const PROP_NAME_MAX: ::c_int = 32;

src/unix/linux_like/emscripten/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,6 +1669,8 @@ pub const PRIO_PROCESS: ::c_int = 0;
16691669
pub const PRIO_PGRP: ::c_int = 1;
16701670
pub const PRIO_USER: ::c_int = 2;
16711671

1672+
pub const SOMAXCONN: ::c_int = 128;
1673+
16721674
f! {
16731675
pub fn CMSG_NXTHDR(mhdr: *const msghdr,
16741676
cmsg: *const cmsghdr) -> *mut cmsghdr {

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,8 @@ pub const STATX_ATTR_NODUMP: ::c_int = 0x0040;
10251025
pub const STATX_ATTR_ENCRYPTED: ::c_int = 0x0800;
10261026
pub const STATX_ATTR_AUTOMOUNT: ::c_int = 0x1000;
10271027

1028+
pub const SOMAXCONN: ::c_int = 4096;
1029+
10281030
//sys/timex.h
10291031
pub const ADJ_OFFSET: ::c_uint = 0x0001;
10301032
pub const ADJ_FREQUENCY: ::c_uint = 0x0002;

src/unix/linux_like/linux/musl/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,8 @@ pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
529529
pub const SOCK_DCCP: ::c_int = 6;
530530
pub const SOCK_PACKET: ::c_int = 10;
531531

532+
pub const SOMAXCONN: ::c_int = 128;
533+
532534
#[deprecated(since = "0.2.55", note = "Use SIGSYS instead")]
533535
pub const SIGUNUSED: ::c_int = ::SIGSYS;
534536

src/unix/linux_like/linux/uclibc/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ pub const PRIO_PROCESS: ::c_int = 0;
235235
pub const PRIO_PGRP: ::c_int = 1;
236236
pub const PRIO_USER: ::c_int = 2;
237237

238+
pub const SOMAXCONN: ::c_int = 128;
239+
238240
pub const ST_RELATIME: ::c_ulong = 4096;
239241

240242
pub const AF_NFC: ::c_int = PF_NFC;

src/unix/linux_like/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,8 +759,6 @@ pub const PF_IEEE802154: ::c_int = AF_IEEE802154;
759759
pub const PF_CAIF: ::c_int = AF_CAIF;
760760
pub const PF_ALG: ::c_int = AF_ALG;
761761

762-
pub const SOMAXCONN: ::c_int = 128;
763-
764762
pub const MSG_OOB: ::c_int = 1;
765763
pub const MSG_PEEK: ::c_int = 2;
766764
pub const MSG_DONTROUTE: ::c_int = 4;

0 commit comments

Comments
 (0)