Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build failed on Windows #510

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/supplemental/nanolib/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#define MAX_CALLBACKS 10

#if NANO_PLATFORM_WINDOWS
#if NNG_PLATFORM_WINDOWS
#define nano_localtime(t, pTm) localtime_s(pTm, t)
#else
#include <sys/types.h>
Expand Down Expand Up @@ -61,8 +61,8 @@ static void
stdout_callback(log_event *ev)
{
char buf[64];
#if (NNG_PLATFORM_WINDOWS || NNG_PLATFORM_DARWIN)
pid_t pid = nni_plat_getpid();
#if (NNG_PLATFORM_WINDOWS || NNG_PLATFORM_DARWIN)
int pid = nni_plat_getpid();
#else
pid_t pid = syscall(__NR_gettid);
#endif
Expand All @@ -85,9 +85,9 @@ stdout_callback(log_event *ev)
static void
file_callback(log_event *ev)
{
char buf[64];
char buf[64];
#if (NNG_PLATFORM_WINDOWS || NNG_PLATFORM_DARWIN)
pid_t pid = nni_plat_getpid();
int pid = nni_plat_getpid();
#else
pid_t pid = syscall(__NR_gettid);
#endif
Expand Down