Skip to content

Commit

Permalink
kcov: fix another missing include in macOS system headers
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Jan 23, 2024
1 parent 011659f commit f5b40fc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions recipes/kcov/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ sources:
patches:
"42":
- patch_file: "patches/0003-fix-missing-include.patch"
patch_description: "Add a missing #include <assert.h>"
patch_type: "bugfix"
patch_description: "Add a missing includes on macOS"
patch_type: "backport"

Check warning on line 15 in recipes/kcov/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. found arbitrary text in patch_type: backport ^ (line: 15)
- patch_file: "patches/0004-fix-libdwarf-prefix.patch"
patch_description: "Adjust libdwarf include to match CCI includedirs"
patch_type: "conan"
Expand Down
20 changes: 15 additions & 5 deletions recipes/kcov/all/patches/0003-fix-missing-include.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
Use updated includes from master to fix a missing <cassert> and <sys/types.h>
https://github.com/SimonKagstrom/kcov/blob/1d036f7799f95fed025c5fa0665c19df38632ab4/src/engines/mach-engine.cc

--- src/engines/mach-engine.cc
+++ src/engines/mach-engine.cc
@@ -30,6 +30,7 @@
@@ -26,7 +26,14 @@
#include <set>
#include <signal.h>
#include <spawn.h>
+#include <sys/errno.h>
+// clang-format off
+// sys/ptrace.h needs sys/types.h, so make sure clang-format doesn't change the order
+#include <sys/types.h>
#include <sys/ptrace.h>
+// clang-format on
+#include <cassert>
+#include <iostream>
#include <unistd.h>
#include <unordered_map>
#include <utils.hh>
+#include <assert.h>

using namespace kcov;
extern char** environ;

0 comments on commit f5b40fc

Please sign in to comment.