Skip to content

glibc: Move more socket.h constants to src/new - #5479

Merged
tgross35 merged 2 commits into
rust-lang:mainfrom
tgross35:new-socket
Sep 5, 2026
Merged

tgross35 merged 2 commits into
rust-lang:mainfrom
tgross35:new-socket

Conversation

@tgross35

@tgross35 tgross35 commented Sep 5, 2026 •

Copy link
Copy Markdown
Member

No description provided.

@tgross35
tgross35 force-pushed the new-socket branch 4 times, most recently from ed4fe11 to 912a7d2 Compare September 5, 2026 19:25
ctest must not support nonpublic constant types, during testing we get
get:

       cargo:warning=/checkout/target/x86_64-unknown-linux-gnu/debug/build/libc-test/5b4faecd46dc6111/out/ctest_output.c:4929:8: error: unknown type name '__socket_type'; did you mean '__socklen_t'?
      cargo:warning= 4929 | static __socket_type ctest_const_SOCK_STREAM_val_static = SOCK_STREAM;
      cargo:warning=      |        ^~~~~~~~~~~~~
      cargo:warning=      |        __socklen_t
      cargo:warning=/checkout/target/x86_64-unknown-linux-gnu/debug/build/libc-test/5b4faecd46dc6111/out/ctest_output.c:4931:14: error: unknown type name '__socket_type'; use 'enum' keyword to refer to the type
      cargo:warning= 4931 | CTEST_EXTERN __socket_type *ctest_const__SOCK_STREAM(void) {
      cargo:warning=      |              ^~~~~~~~~~~~~
      cargo:warning=      |              enum
      cargo:warning=/checkout/target/x86_64-unknown-linux-gnu/debug/build/libc-test/5b4faecd46dc6111/out/ctest_output.c:4935:8: error: unknown type name '__socket_type'; did you mean '__socklen_t'?
      cargo:warning= 4935 | static __socket_type ctest_const_SOCK_DGRAM_val_static = SOCK_DGRAM;
      cargo:warning=      |        ^~~~~~~~~~~~~
      cargo:warning=      |        __socklen_t
      cargo:warning=/checkout/target/x86_64-unknown-linux-gnu/debug/build/libc-test/5b4faecd46dc6111/out/ctest_output.c:4937:14: error: unknown type name '__socket_type'; use 'enum' keyword to refer to the type
      cargo:warning= 4937 | CTEST_EXTERN __socket_type *ctest_const__SOCK_DGRAM(void) {
      cargo:warning=      |              ^~~~~~~~~~~~~
      cargo:warning=      |              enum


Link: https://github.com/sailfishos-mirror/glibc/blob/fe03757f67e25bc8fea1473572beb30a05508d08/socket/sys/socket.h
Link: https://github.com/sailfishos-mirror/glibc/blob/fe03757f67e25bc8fea1473572beb30a05508d08/sysdeps/unix/sysv/linux/bits/socket.h
Link: https://github.com/sailfishos-mirror/glibc/blob/fe03757f67e25bc8fea1473572beb30a05508d08/sysdeps/unix/sysv/linux/bits/socket_type.h
Link: https://github.com/sailfishos-mirror/glibc/blob/fe03757f67e25bc8fea1473572beb30a05508d08/sysdeps/unix/sysv/linux/mips/bits/socket_type.h
Link: https://github.com/sailfishos-mirror/glibc/blob/fe03757f67e25bc8fea1473572beb30a05508d08/sysdeps/unix/sysv/linux/sparc/bits/socket_type.h
@tgross35 tgross35 changed the title linux: Move more socket.h definitions to src/new glibc Move more socket.h constants to src/new Sep 5, 2026
@tgross35 tgross35 changed the title glibc Move more socket.h constants to src/new glibc: Move more socket.h constants to src/new Sep 5, 2026
@tgross35
tgross35 marked this pull request as ready for review September 5, 2026 19:37
@tgross35
tgross35 enabled auto-merge September 5, 2026 19:37
@tgross35
tgross35 added this pull request to the merge queue Sep 5, 2026
Merged via the queue into rust-lang:main with commit 0136060 Sep 5, 2026
58 checks passed
@tgross35
tgross35 deleted the new-socket branch September 5, 2026 20:22
@tgross35 tgross35 mentioned this pull request Sep 17, 2026
renovate-bot pushed a commit to renovate-bot/rust-lang-_-libc that referenced this pull request Sep 17, 2026
(backport <rust-lang#5479>)
(cherry picked from commit d25215c)
renovate-bot pushed a commit to renovate-bot/rust-lang-_-libc that referenced this pull request Sep 17, 2026
ctest must not support nonpublic constant types, during testing we get
get:

       cargo:warning=/checkout/target/x86_64-unknown-linux-gnu/debug/build/libc-test/5b4faecd46dc6111/out/ctest_output.c:4929:8: error: unknown type name '__socket_type'; did you mean '__socklen_t'?
      cargo:warning= 4929 | static __socket_type ctest_const_SOCK_STREAM_val_static = SOCK_STREAM;
      cargo:warning=      |        ^~~~~~~~~~~~~
      cargo:warning=      |        __socklen_t
      cargo:warning=/checkout/target/x86_64-unknown-linux-gnu/debug/build/libc-test/5b4faecd46dc6111/out/ctest_output.c:4931:14: error: unknown type name '__socket_type'; use 'enum' keyword to refer to the type
      cargo:warning= 4931 | CTEST_EXTERN __socket_type *ctest_const__SOCK_STREAM(void) {
      cargo:warning=      |              ^~~~~~~~~~~~~
      cargo:warning=      |              enum
      cargo:warning=/checkout/target/x86_64-unknown-linux-gnu/debug/build/libc-test/5b4faecd46dc6111/out/ctest_output.c:4935:8: error: unknown type name '__socket_type'; did you mean '__socklen_t'?
      cargo:warning= 4935 | static __socket_type ctest_const_SOCK_DGRAM_val_static = SOCK_DGRAM;
      cargo:warning=      |        ^~~~~~~~~~~~~
      cargo:warning=      |        __socklen_t
      cargo:warning=/checkout/target/x86_64-unknown-linux-gnu/debug/build/libc-test/5b4faecd46dc6111/out/ctest_output.c:4937:14: error: unknown type name '__socket_type'; use 'enum' keyword to refer to the type
      cargo:warning= 4937 | CTEST_EXTERN __socket_type *ctest_const__SOCK_DGRAM(void) {
      cargo:warning=      |              ^~~~~~~~~~~~~
      cargo:warning=      |              enum

Link: https://github.com/sailfishos-mirror/glibc/blob/fe03757f67e25bc8fea1473572beb30a05508d08/socket/sys/socket.h
Link: https://github.com/sailfishos-mirror/glibc/blob/fe03757f67e25bc8fea1473572beb30a05508d08/sysdeps/unix/sysv/linux/bits/socket.h
Link: https://github.com/sailfishos-mirror/glibc/blob/fe03757f67e25bc8fea1473572beb30a05508d08/sysdeps/unix/sysv/linux/bits/socket_type.h
Link: https://github.com/sailfishos-mirror/glibc/blob/fe03757f67e25bc8fea1473572beb30a05508d08/sysdeps/unix/sysv/linux/mips/bits/socket_type.h
Link: https://github.com/sailfishos-mirror/glibc/blob/fe03757f67e25bc8fea1473572beb30a05508d08/sysdeps/unix/sysv/linux/sparc/bits/socket_type.h

(backport <rust-lang#5479>)
(cherry picked from commit 0136060)
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants