0345cc0830
On macOS the function has a flags argument, so we don't need the /proc/self/fd trick used on Linux.
On macOS the function has a flags argument, so we don't need the /proc/self/fd trick used on Linux.