Fix Alpine 3.13 ARM build (#50105)
authorJan Vorlicek <jan.vorlicek@volny.cz>
Wed, 24 Mar 2021 14:31:24 +0000 (15:31 +0100)
committerGitHub <noreply@github.com>
Wed, 24 Mar 2021 14:31:24 +0000 (15:31 +0100)
commit5b77db9acea897daa42b4c994ace94b019bd8191
tree1a6cef7c9166b375d85aab353c4a791d4cff0e99
parent1a95b65ae5681205214ea3cdac4e21d98d53a0c5
Fix Alpine 3.13 ARM build (#50105)

* Fix Alpine 3.13 ARM build

Alpine 3.13 is the first version of Alpine Linux that uses 64 bit time_t
on both 64 and 32 bit platforms. That breaks the build as we assumed
that 32 bit platforms use always 32 bit time_t.

This change fixes it by making the PAL time_t type always 64 bit.
Everything still works fine on non-Alpine ARM / x86 Linuxes, since
it only changes the time_t type size outside of PAL.

* Fix case when time function gets NULL argument
src/coreclr/pal/inc/pal.h
src/coreclr/pal/src/cruntime/misc.cpp
src/libraries/Native/Unix/System.Native/pal_random.c