mirror of
https://github.com/lifegpc/c-utils.git
synced 2026-06-06 05:08:45 +08:00
Fix bug
This commit is contained in:
@@ -40,6 +40,7 @@ if (Iconv_FOUND)
|
||||
set(HAVE_ICONV 1)
|
||||
endif()
|
||||
|
||||
include(CheckIncludeFile)
|
||||
include(CheckSymbolExists)
|
||||
include(TestStrerrorR)
|
||||
if (WIN32)
|
||||
@@ -97,6 +98,7 @@ if (NOT WIN32)
|
||||
check_symbol_exists(clock_gettime "time.h" HAVE_CLOCK_GETTIME)
|
||||
check_symbol_exists(usleep "unistd.h" HAVE_USLEEP)
|
||||
check_symbol_exists(nanosleep "time.h" HAVE_NANOSLEEP)
|
||||
CHECK_INCLUDE_FILE("netinet/in.h" HAVE_NETINET_IN_H)
|
||||
endif()
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/utils_config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/utils_config.h")
|
||||
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
#include <fcntl.h>
|
||||
#if _WIN32
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#if HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "cstr_util.h"
|
||||
|
||||
@@ -29,3 +29,4 @@
|
||||
#cmakedefine HAVE_CLOCK_GETTIME @HAVE_CLOCK_GETTIME@
|
||||
#cmakedefine HAVE_USLEEP @HAVE_USLEEP@
|
||||
#cmakedefine HAVE_NANOSLEEP @HAVE_NANOSLEEP@
|
||||
#cmakedefine HAVE_NETINET_IN_H @HAVE_NETINET_IN_H@
|
||||
|
||||
Reference in New Issue
Block a user