crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.21k stars 1.61k forks source link

`Socket#close_on_exec?` fails to build on Windows #14636

Closed straight-shoota closed 1 month ago

straight-shoota commented 1 month ago
socket = Socket.new(Socket::Family::INET, Socket::Type::STREAM, Socket::Protocol::TCP)
socket.close_on_exec?.should be_true # Error: undefined constant LibC::F_GETFD

This also points out that we're missing spec coverage on methods like this.

Discovered in #14632 (https://github.com/crystal-lang/crystal/actions/runs/9260564175/job/25474734523?pr=14632).