From 0d3b487f5d501cf54ebbffe0dbdc79c1b029dd05 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sun, 8 Dec 2019 12:27:31 +0100 Subject: [PATCH] unix: fix -Wstrict-aliasing compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/libuv/libuv/issues/2563 PR-URL: https://github.com/libuv/libuv/pull/2564 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: Santiago Gimeno Reviewed-By: Saúl Ibarra Corretgé --- src/unix/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/fs.c b/src/unix/fs.c index be256bfc..a864ffd8 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -286,7 +286,7 @@ static int uv__fs_mkstemp(uv_fs_t* req) { #ifdef O_CLOEXEC if (no_cloexec_support == 0) { - *(int**)(&mkostemp_function) = dlsym(RTLD_DEFAULT, "mkostemp"); + mkostemp_function = (int (*)(char*, int)) dlsym(RTLD_DEFAULT, "mkostemp"); /* We don't care about errors, but we do want to clean them up. If there has been no error, then dlerror() will just return