diff --git a/source/darwin/dispatch_queue_event_loop.c b/source/darwin/dispatch_queue_event_loop.c index 6b00cee58..f5690e641 100644 --- a/source/darwin/dispatch_queue_event_loop.c +++ b/source/darwin/dispatch_queue_event_loop.c @@ -214,7 +214,6 @@ struct aws_event_loop *aws_event_loop_new_with_dispatch_queue( struct aws_event_loop *loop = aws_mem_calloc(alloc, 1, sizeof(struct aws_event_loop)); struct dispatch_loop *dispatch_loop = NULL; - dispatch_loop->allocator = alloc; AWS_LOGF_DEBUG(AWS_LS_IO_EVENT_LOOP, "id=%p: Initializing dispatch_queue event-loop", (void *)loop); if (aws_event_loop_init_base(loop, alloc, options->clock)) { @@ -222,6 +221,7 @@ struct aws_event_loop *aws_event_loop_new_with_dispatch_queue( } dispatch_loop = aws_mem_calloc(alloc, 1, sizeof(struct dispatch_loop)); + dispatch_loop->allocator = alloc; char dispatch_queue_id[AWS_IO_APPLE_DISPATCH_QUEUE_ID_LENGTH] = {0}; s_get_unique_dispatch_queue_id(dispatch_queue_id); diff --git a/source/darwin/nw_socket.c b/source/darwin/nw_socket.c index 14f3ee30a..4cebad8a8 100644 --- a/source/darwin/nw_socket.c +++ b/source/darwin/nw_socket.c @@ -325,6 +325,7 @@ static void s_socket_impl_destroy(void *sock_ptr) { nw_socket = NULL; } +#ifdef AWS_ENABLE_DISPATCH_QUEUE int aws_socket_init_apple_nw_socket( struct aws_socket *socket, struct aws_allocator *alloc, @@ -375,6 +376,7 @@ int aws_socket_init_apple_nw_socket( return AWS_OP_SUCCESS; } +#endif static void s_client_set_dispatch_queue(struct aws_io_handle *handle, void *queue) { nw_connection_set_queue(handle->data.handle, queue);