diff options
author | 2023-01-07 07:09:48 -0800 | |
---|---|---|
committer | 2023-01-07 07:09:48 -0800 | |
commit | 87983464d8a331c1ddd09eced9920269a759f0a9 (patch) | |
tree | b08a5aef5c2d18f25a5ee46c88bec84d5b8ee907 /src/io/io_darwin.cpp | |
parent | d5565ab2cdd7099a5852ba5ba6d180ef291af084 (diff) | |
download | bun-87983464d8a331c1ddd09eced9920269a759f0a9.tar.gz bun-87983464d8a331c1ddd09eced9920269a759f0a9.tar.zst bun-87983464d8a331c1ddd09eced9920269a759f0a9.zip |
Implement DNS module (#1691)
* Boilerplate for DNS stuff
* Add c-ares
* lookup
* make
* Implement dns.lookup
* Create c-ares
* wip
* normalize
* repro
* Revert "repro"
This reverts commit 8b93e0c295b335b8882a9601da47720348549beb.
* Implement macOS `getaddrinfo_async_start`
* embiggen
* Update string_immutable.zig
* Update Makefile
* alright
* Update .gitignore
* Add types
* more ccache
* Update Dockerfile
* Update Dockerfile
* Update Dockerfile
* Update bun.d.ts
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/io/io_darwin.cpp')
-rw-r--r-- | src/io/io_darwin.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/io/io_darwin.cpp b/src/io/io_darwin.cpp index fff41d373..61e3f1624 100644 --- a/src/io/io_darwin.cpp +++ b/src/io/io_darwin.cpp @@ -43,6 +43,20 @@ extern "C" mach_port_t io_darwin_create_machport(uint64_t wakeup, int32_t fd, } } +extern "C" bool getaddrinfo_send_reply(mach_port_t port, + void (*sendReply)(void *)) { + mach_msg_empty_rcv_t msg; + mach_msg_return_t status; + + status = mach_msg(&msg.header, MACH_RCV_MSG, 0, sizeof(msg), port, + MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + if (status != MACH_MSG_SUCCESS) { + return false; + } + sendReply(&msg); + return true; +} + extern "C" bool io_darwin_schedule_wakeup(mach_port_t waker) { mach_msg_empty_send_t message{}; message.header.msgh_size = sizeof(message); |