You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by nw...@apache.org on 2020/02/29 10:49:31 UTC
[incubator-heron] branch master updated: Patch to fix cppcheck with
newer glibc (#3471)
This is an automated email from the ASF dual-hosted git repository.
nwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
The following commit(s) were added to refs/heads/master by this push:
new a6ec96e Patch to fix cppcheck with newer glibc (#3471)
a6ec96e is described below
commit a6ec96e8102693c417f44bf69c7805615f06b917
Author: Nicholas Nezis <ni...@gmail.com>
AuthorDate: Sat Feb 29 05:49:20 2020 -0500
Patch to fix cppcheck with newer glibc (#3471)
---
WORKSPACE | 8 +++++---
third_party/cppcheck/cppcheck-readdir-fix.patch | 12 ++++++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/WORKSPACE b/WORKSPACE
index ac4393f..065d85b 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -930,10 +930,12 @@ http_archive(
http_archive(
name = "com_github_danmar_cppcheck",
- urls = ["https://github.com/danmar/cppcheck/archive/1.87.zip"],
- strip_prefix = "cppcheck-1.87",
build_file = "@//:third_party/cppcheck/cppcheck.BUILD",
- sha256 = "b3de7fbdc1a23d7341b55f7f88877e106a76847bd5a07fa721c07310b625318b",
+ patch_args = ["-p2"],
+ patches = ["//third_party/cppcheck:cppcheck-readdir-fix.patch"],
+ sha256 = "cb0e66cbe2d6b655fce430cfaaa74b83ad11c91f221e3926f1ca3211bb7c906b",
+ strip_prefix = "cppcheck-1.90",
+ urls = ["https://github.com/danmar/cppcheck/archive/1.90.zip"],
)
http_archive(
diff --git a/third_party/cppcheck/cppcheck-readdir-fix.patch b/third_party/cppcheck/cppcheck-readdir-fix.patch
new file mode 100644
index 0000000..bde961a
--- /dev/null
+++ b/third_party/cppcheck/cppcheck-readdir-fix.patch
@@ -0,0 +1,12 @@
+diff -Naur cppcheck/cppcheck-1.90/cli/filelister.cpp cppcheck-fixed/cppcheck-1.90/cli/filelister.cpp
+--- cppcheck/cppcheck-1.90/cli/filelister.cpp 2020-02-20 22:42:28.000000000 -0500
++++ cppcheck-fixed/cppcheck-1.90/cli/filelister.cpp 2020-02-20 22:44:48.000000000 -0500
+@@ -194,7 +194,7 @@
+ std::string new_path;
+ new_path.reserve(path.length() + 100);// prealloc some memory to avoid constant new/deletes in loop
+
+- while ((readdir_r(dir, &entry, &dir_result) == 0) && (dir_result != nullptr)) {
++ while ((dir_result = readdir(dir)) != NULL) {
+
+ if ((std::strcmp(dir_result->d_name, ".") == 0) ||
+ (std::strcmp(dir_result->d_name, "..") == 0))