Backported an upstream commit to fix build with musl 1.2.4. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>