Merge pull request #739 from grspy/master

Fix 32-bit time_t compilation error on WIN64
This commit is contained in:
Iceman 2020-05-19 20:47:49 +02:00 committed by GitHub
commit 6a87bdd44e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -661,10 +661,10 @@ void pm3_version(bool verbose, bool oneliner) {
# define PM3HOSTOS " OS:OpenBSD"
#elif defined(__CYGWIN__)
# define PM3HOSTOS " OS:Cygwin"
#elif defined(_WIN64) | defined(__WIN64__)
#elif defined(_WIN64) || defined(__WIN64__)
// must be tested before _WIN32
# define PM3HOSTOS " OS:Windows (64b)"
#elif defined(_WIN32) | defined(__WIN32__)
#elif defined(_WIN32) || defined(__WIN32__)
# define PM3HOSTOS " OS:Windows (32b)"
#else
# define PM3HOSTOS " OS:unknown"

View file

@ -1,5 +1,7 @@
#define __STDC_FORMAT_MACROS
#define _USE_32BIT_TIME_T 1
#if !defined(_WIN64)
# define _USE_32BIT_TIME_T 1
#endif
#include <inttypes.h>
#include <stdio.h>
#include <stdbool.h>