From b1e0c2c8be1d8355617929df0acf618af30dc09c Mon Sep 17 00:00:00 2001 From: Sven Over Date: Mon, 14 Mar 2016 11:43:33 -0700 Subject: [PATCH] folly/portability/Constexpr.h: add missing include statement Summary:This commit fixes compiler errors when Constexpr.h was included on gcc before cstring (or string.h) was included. Also, qualify the call to strlen with the std namespace. Reviewed By: yfeldblum Differential Revision: D3047417 fb-gh-sync-id: 7a50dac2e9449b149062896f34fa5e864f767943 shipit-source-id: 7a50dac2e9449b149062896f34fa5e864f767943 --- folly/portability/Constexpr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/folly/portability/Constexpr.h b/folly/portability/Constexpr.h index 810f987a..7ea46300 100755 --- a/folly/portability/Constexpr.h +++ b/folly/portability/Constexpr.h @@ -18,6 +18,7 @@ #define FOLLY_CONSTEXPR_H_ #include +#include namespace folly { @@ -45,7 +46,7 @@ constexpr size_t constexpr_strlen(const char* s) { #elif defined(_MSC_VER) return s == nullptr ? 0 : constexpr_strlen_internal(s, 0); #else - return strlen(s); + return std::strlen(s); #endif } } -- 2.34.1