Windows:sys/time.h: Reamove linking error at localtime_s

Summary:
Remove the following linking error:
```
[18/1920] Linking target src/lib/evil/unposix/sys/evil_unposix_sys-1.dll.
FAILED: src/lib/evil/unposix/sys/evil_unposix_sys-1.dll
lld-link @src/lib/evil/unposix/sys/evil_unposix_sys-1.dll.rsp
lld-link: error: undefined symbol: localtime_s
>>> referenced by src/lib/evil/unposix/sys/f1142d4@@evil_unposix_sys@sha/time.c.obj:(l
ocaltime_r)
```

`localtime_t` is from `ucrt/time.h`. `#include <time.h>` was not picking
`UCRT` implementation of `time.h`, now it is changed to `#include
<../ucrt/time.h>`, forcing `UCRT`'s implementation.

If at some point `time.h` (`time.h` not `sys/time.h`) is add to
`unposix` this should be changed to `#include <../time.h>` as there
shoud be a `#include_next <time.h>`.

Test Plan:
- added -k0 to NINJAFLAGS at build.bat;
- there should not be any errors/warnings about sys/time.h.
- there will be a lot of other linkge errors, but none about finding
  methods defined at `sys/time.{h,c}`.
This commit is contained in:
Lucas Cavalcante de Sousa 2020-04-01 10:49:58 -03:00 committed by João Paulo Taylor Ienczak Zanette
parent 1c6e5d314e
commit 7af8f90828
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@
#include <timezoneapi.h>
#include <stdint.h>
#include <time.h>
#include <../ucrt/time.h>
#include <sys/types.h>
typedef unsigned short u_short;