diff --git a/src/env_dispatch.cpp b/src/env_dispatch.cpp index 88dfb57fc..ff0e6ff93 100644 --- a/src/env_dispatch.cpp +++ b/src/env_dispatch.cpp @@ -329,7 +329,9 @@ static std::unique_ptr create_dispatch_table() { var_dispatch_table->add(L"fish_history", handle_fish_history_change); var_dispatch_table->add(L"TZ", handle_tz_change); var_dispatch_table->add(L"fish_use_posix_spawn", handle_fish_use_posix_spawn_change); - return var_dispatch_table; + + // This std::move is required to avoid a build error on old versions of libc++ (#5801) + return std::move(var_dispatch_table); } static void run_inits(const environment_t &vars) {