Skip to content

Commit 23d16d7

Browse files
authored
Merge pull request microsoft#569 from aduskett/master
fix compiling with non-glib Linux c libraries
2 parents d2acec6 + 88fa4d2 commit 23d16d7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Release/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ include(cmake/cpprest_find_boost.cmake)
6262
include(cmake/cpprest_find_zlib.cmake)
6363
include(cmake/cpprest_find_openssl.cmake)
6464
include(cmake/cpprest_find_websocketpp.cmake)
65+
include(CheckIncludeFiles)
6566

6667
find_package(Threads REQUIRED)
6768
if(THREADS_HAVE_PTHREAD_ARG)
@@ -76,6 +77,7 @@ if(CPPREST_EXCLUDE_WEBSOCKETS)
7677
set(CPPREST_WEBSOCKETS_IMPL none CACHE STRING "Internal use.")
7778
endif()
7879

80+
CHECK_INCLUDE_FILES(xlocale.h HAVE_XLOCALE_H)
7981
if(APPLE) # Note: also iOS
8082
set(CPPREST_PPLX_IMPL apple CACHE STRING "Internal use.")
8183
set(CPPREST_WEBSOCKETS_IMPL wspp CACHE STRING "Internal use.")

Release/include/cpprest/asyncrt_utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <system_error>
2020
#include <random>
2121
#include <locale.h>
22-
2322
#include "pplx/pplxtasks.h"
2423
#include "cpprest/details/basic_types.h"
2524

@@ -28,8 +27,9 @@
2827
#endif
2928

3029
#ifndef _WIN32
30+
#include <sys/time.h>
3131
#include <boost/algorithm/string.hpp>
32-
#if !defined(ANDROID) && !defined(__ANDROID__) && !defined(__GLIBC__) // CodePlex 269
32+
#if !defined(ANDROID) && !defined(__ANDROID__) && defined(HAVE_XLOCALE_H) // CodePlex 269
3333
/* Systems using glibc: xlocale.h has been removed from glibc 2.26
3434
The above include of locale.h is sufficient
3535
Further details: https://sourceware.org/git/?p=glibc.git;a=commit;h=f0be25b6336db7492e47d2e8e72eb8af53b5506d */

0 commit comments

Comments
 (0)