Merge pull request #270101 from mfrischknecht/osquery-llvm-15

osquery: Apply unreleased upstream patch to build using Clang 16

authored by Silvan Mosberger and committed by GitHub d50cfe20 d5307e6c

+27 -14
+17 -14
pkgs/tools/system/osquery/Use-locale.h-instead-of-removed-xlocale.h-header.patch
··· 1 - From: Jack Baldry <jack.baldry@grafana.com> 2 - Date: Tue, 15 Nov 2022 14:34:33 -0400 3 - Subject: [PATCH] Use locale.h instead of removed xlocale.h header 4 - 5 - https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27 6 - 7 - Signed-off-by: Jack Baldry <jack.baldry@grafana.com> 8 - --- 9 - libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h | 4 ++-- 10 - 1 file changed, 2 insertions(+), 2 deletions(-) 11 - 1 + diff --git a/libraries/cmake/source/augeas/gnulib/generated/linux/aarch64/lib/locale.h b/libraries/cmake/source/augeas/gnulib/generated/linux/aarch64/lib/locale.h 2 + index 4f9baece2..afe947956 100644 3 + --- a/libraries/cmake/source/augeas/gnulib/generated/linux/aarch64/lib/locale.h 4 + +++ b/libraries/cmake/source/augeas/gnulib/generated/linux/aarch64/lib/locale.h 5 + @@ -48,9 +48,9 @@ 6 + /* NetBSD 5.0 mis-defines NULL. */ 7 + #include <stddef.h> 8 + 9 + -/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */ 10 + +/* Mac OS X 10.5 defines the locale_t type in <locale.h>. */ 11 + #if 1 12 + -# include <xlocale.h> 13 + +# include <locale.h> 14 + #endif 15 + 16 + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ 12 17 diff --git a/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h b/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h 18 + index 4f9baece2..afe947956 100644 13 19 --- a/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h 14 20 +++ b/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h 15 21 @@ -48,9 +48,9 @@ ··· 24 30 #endif 25 31 26 32 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ 27 - -- 28 - 2.38.1 29 -
+10
pkgs/tools/system/osquery/default.nix
··· 1 1 { lib 2 2 , cmake 3 3 , fetchFromGitHub 4 + , fetchpatch 4 5 , git 5 6 , llvmPackages 6 7 , nixosTests ··· 32 33 ./Remove-circular-definition-of-AUDIT_FILTER_EXCLUDE.patch 33 34 # For current state of compilation against glibc in the clangWithLLVM toolchain, refer to the upstream issue in https://github.com/osquery/osquery/issues/7823. 34 35 ./Remove-system-controls-table.patch 36 + 37 + # osquery uses a vendored boost library that still relies on old standard types (e.g. `std::unary_function`) 38 + # which have been removed as of C++17. The patch is already checked in upstream, but there have been no 39 + # releases yet. Can likely be removed with versions > 5.10.2. 40 + (fetchpatch { 41 + name = "fix-build-on-clang-16.patch"; 42 + url = "https://github.com/osquery/osquery/commit/222991a15b4ae0a0fb919e4965603616536e1b0a.patch"; 43 + hash = "sha256-PdzEoeR1LXVri1Cd+7KMhKmDC8yZhAx3f1+9tjLJKyo="; 44 + }) 35 45 ]; 36 46 37 47