Descent3 icon indicating copy to clipboard operation
Descent3 copied to clipboard

Replace ioctl with fcntl, fix ioctlsocket calls (64-bit fix)

Open GravisZro opened this issue 9 months ago • 2 comments

These take two different types of arguments but worked in the past due to long being 32-bit.

Pull Request Type

  • [ ] GitHub Workflow changes
  • [ ] Documentation or Wiki changes
  • [ ] Build and Dependency changes
  • [x] Runtime changes
    • [ ] Render changes
    • [ ] Audio changes
    • [ ] Input changes
    • [x] Network changes
    • [ ] Other changes

Description

The ioctl argument for UNIX systems is int* while the ioctlsocket argument for Windows is unsigned long*. On 32-bit systems theses coincided so no problems but not on 64-bit. However, the behavior of ioctl calls is non-standard which is why code should use fnctl.

See also:

Checklist

  • [x] I have tested my changes locally and verified that they work as intended.
  • [x] I have reviewed the changes to ensure they do not introduce any unnecessary complexity or duplicate code.
  • [x] I understand that by submitting this pull request, I am agreeing to license my contributions under the project's license.

Additional Comments

GravisZro avatar May 16 '24 14:05 GravisZro