mirror of
https://github.com/GerbilSoft/rvthtool.git
synced 2025-06-18 11:35:33 -04:00
[cmake] 64BitTimeSupportFcntl.cpp: This file was missing...
Copied it from rom-properties.
This broke the Launchpad Ubuntu 20.04 armhf build. Not going to resubmit
it, because I don't think anyone will be using rvthtool on that OS and
platform...
(cherry picked from commit d9f4ec96f1
)
This commit is contained in:
parent
d0498b9e7d
commit
43b9691078
19
cmake/macros/64BitTimeSupportFcntl.cpp
Normal file
19
cmake/macros/64BitTimeSupportFcntl.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* 64-bit time_t test code, with fcntl.h.
|
||||
* Reference: https://github.com/Benjamin-Dobell/Heimdall/blob/master/cmake/LargeFiles.c
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
/** static_assert() macro copied from c++11-compat.h **/
|
||||
#define static_assert(expr, msg) switch (0) { case 0: case (expr): ; }
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
static_assert(sizeof(time_t) == sizeof(int64_t), "time_t is the wrong size");
|
||||
int64_t tm64;
|
||||
time_t tm = time(&tm64);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user