Skip to content

linux: Move more socket.h definitions to src/new - #5479

Draft
tgross35 wants to merge 2 commits into
rust-lang:mainfrom
tgross35:new-socket
Draft

linux: Move more socket.h definitions to src/new#5479
tgross35 wants to merge 2 commits into
rust-lang:mainfrom
tgross35:new-socket

Conversation

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/mips/bits/socket_type.h
Link: https://github.com/sailfishos-mirror/glibc/blob/fe03757f67e25bc8fea1473572beb30a05508d08/sysdeps/unix/sysv/linux/sparc/bits/socket_type.h
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