Skip to content

Add test for ctime_r(), replace mem::uninitialized()

Peter Limkilde Svendsen requested to merge plimkilde/relibc:ctime_r into master

This adds a test for the ctime_r() function and fixes its use of the deprecated mem::uninitialized().

The obvious replacement would of course be a MaybeUninit<tm>, but that causes the following error for me when building:

thread 'main' panicked at 'Unable to generate bindings: ParseSyntaxError { crate_name: "mod", src_path: "src/header/time/mod.rs", error: Error("expected `;`") }', src/libcore/result.rs:1189:5

Instead, a zero-initialized tm is used.

Merge request reports