On Linux (and Unix-like operating systems), shutdown is the name of a function to shut down part of a full-duplex connection (sockets). The public, unmangled C function shutdown in dos.h clashes with this, resulting in #2. A fix is to just rename it. With careful use of the static keyword (so the shutdown symbol isn't exported) this could be worked around, but this is just more foolproof IMHO.
Feel free to bikeshed on the name and/or rename it yourself :)
Very nice, thanks for finding it. I think I’ll go with the name shuttingdown instead of dos_shutdown - but I can do that myself, I should be able to do it as changes to this PR I think
On Linux (and Unix-like operating systems),
shutdown
is the name of a function to shut down part of a full-duplex connection (sockets). The public, unmangled C functionshutdown
indos.h
clashes with this, resulting in #2. A fix is to just rename it. With careful use of thestatic
keyword (so theshutdown
symbol isn't exported) this could be worked around, but this is just more foolproof IMHO.Feel free to bikeshed on the name and/or rename it yourself :)