Why make two OS_POSIX judgments in loging.cc?
Huoke opened this issue · comments
Describe the bug (描述bug)
#elif defined(OS_POSIX)
#if defined(OS_NACL) || defined(OS_LINUX)
#include <sys/time.h> // timespec doesn't seem to be in <time.h>
#else
#include <sys/syscall.h>
#endif
#include <time.h>
#endif
#if defined(OS_POSIX)
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define MAX_PATH PATH_MAX
typedef FILE* FileHandle;
typedef pthread_mutex_t* MutexHandle;
#endif
To Reproduce (复现方法)
Expected behavior (期望行为)
Versions (各种版本)
OS: buntu1~22.04
Compiler: gcc
brpc:
protobuf:
Additional context/screenshots (更多上下文/截图)