SHA256
8
0
forked from pool/cpprest
Files
cpprest/cpprestsdk-2.9.1-Fix-build-error-with-glibc-2.26-xlocale.h.patch

35 lines
1.3 KiB
Diff

From d4f707abb4575aacf43ec02d30fa10afed464c7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= <c72578@yahoo.de>
Date: Thu, 13 Jul 2017 10:00:12 +0200
Subject: [PATCH] Fix build error with glibc 2.26, xlocale.h
- Do not include xlocale.h on systems, where __GLIBC__ is defined
xlocale.h has been removed from glibc 2.26
The include of locale.h in asyncrt_utils.h is sufficient
Further details:
https://sourceware.org/git/?p=glibc.git;a=commit;h=f0be25b
- Fixes https://github.com/Microsoft/cpprestsdk/issues/485
---
Release/include/cpprest/asyncrt_utils.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Release/include/cpprest/asyncrt_utils.h b/Release/include/cpprest/asyncrt_utils.h
index 169ec3a2..fac70a91 100644
--- a/Release/include/cpprest/asyncrt_utils.h
+++ b/Release/include/cpprest/asyncrt_utils.h
@@ -29,7 +29,10 @@
#ifndef _WIN32
#include <boost/algorithm/string.hpp>
-#if !defined(ANDROID) && !defined(__ANDROID__) // CodePlex 269
+#if !defined(ANDROID) && !defined(__ANDROID__) && !defined(__GLIBC__) // CodePlex 269
+/* Systems using glibc: xlocale.h has been removed from glibc 2.26
+ The above include of locale.h is sufficient
+ Further details: https://sourceware.org/git/?p=glibc.git;a=commit;h=f0be25b6336db7492e47d2e8e72eb8af53b5506d */
#include <xlocale.h>
#endif
#endif
--
2.14.1