[libc] implement ioctl (#85890)

This PR is to work on the issue #85275

GitOrigin-RevId: 289a2c380e47d64a1e626259c53fc8c7d6c2be66
12 files changed