diff --git a/frameworks/libhilog/base/hilog_base.c b/frameworks/libhilog/base/hilog_base.c index 6c26bf237fe1e5619c12979c5f47b8530c685d12..b6f8f527e9d862cb2f51411951cf7700296d743c 100644 --- a/frameworks/libhilog/base/hilog_base.c +++ b/frameworks/libhilog/base/hilog_base.c @@ -29,8 +29,9 @@ #define LOG_LEN 3 #define ERROR_FD 2 -static const int SOCKET_TYPE = SOCK_DGRAM | SOCK_NONBLOCK | SOCK_CLOEXEC; -static const struct sockaddr_un SOCKET_ADDR = {AF_UNIX, SOCKET_FILE_DIR INPUT_SOCKET_NAME}; +const int SOCKET_TYPE = SOCK_DGRAM | SOCK_NONBLOCK | SOCK_CLOEXEC; +const int INVALID_SOCKET = -1; +const struct sockaddr_un SOCKET_ADDR = {AF_UNIX, SOCKET_FILE_DIR INPUT_SOCKET_NAME}; static int SendMessage(HilogMsg *header, const char *tag, uint16_t tagLen, const char *fmt, uint16_t fmtLen) { @@ -117,4 +118,4 @@ bool HiLogBaseIsLoggable(unsigned int domain, const char *tag, LogLevel level) return false; } return true; -} +} \ No newline at end of file