glibc: Move more socket.h constants to src/new - #5479
Merged
Merged
Conversation
tgross35
force-pushed
the
new-socket
branch
4 times, most recently
from
September 5, 2026 19:25
ed4fe11 to
912a7d2
Compare
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
socket.h definitions to src/newsocket.h constants to src/new
socket.h constants to src/newsocket.h constants to src/new
tgross35
marked this pull request as ready for review
September 5, 2026 19:37
tgross35
enabled auto-merge
September 5, 2026 19:37
Merged
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.