Skip to content

Commit

Permalink
* FIX [log] fix Cannot open include file: 'unistd.h'
Browse files Browse the repository at this point in the history
  • Loading branch information
alvin1221 committed Apr 14, 2023
1 parent 1f3d63e commit 5039553
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit 5039553

Please sign in to comment.