mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
pacparser: fix build on GCC 14
This commit is contained in:
parent
e61241410d
commit
fa560bbd40
2 changed files with 24 additions and 4 deletions
11
pkgs/by-name/pa/pacparser/fix-invalid-pointer-type.patch
Normal file
11
pkgs/by-name/pa/pacparser/fix-invalid-pointer-type.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/src/spidermonkey/js/src/jsapi.c
|
||||
+++ b/src/spidermonkey/js/src/jsapi.c
|
||||
@@ -93,7 +93,7 @@
|
||||
#ifdef HAVE_VA_LIST_AS_ARRAY
|
||||
#define JS_ADDRESSOF_VA_LIST(ap) ((va_list *)(ap))
|
||||
#else
|
||||
-#define JS_ADDRESSOF_VA_LIST(ap) (&(ap))
|
||||
+#define JS_ADDRESSOF_VA_LIST(ap) ((va_list *)(&(ap)))
|
||||
#endif
|
||||
|
||||
#if defined(JS_PARANOID_REQUEST) && defined(JS_THREADSAFE)
|
|
@ -4,22 +4,31 @@
|
|||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "pacparser";
|
||||
version = "1.4.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "manugarg";
|
||||
repo = "pacparser";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-X842+xPjM404aQJTc2JwqU4vq8kgyKhpnqVu70pNLks=";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-X842+xPjM404aQJTc2JwqU4vq8kgyKhpnqVu70pNLks=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# jsapi.c:96:35: error: passing argument 5 of 'TryArgumentFormatter' from incompatible pointer type []
|
||||
# 96 | #define JS_ADDRESSOF_VA_LIST(ap) (&(ap))
|
||||
# suggested by https://github.com/manugarg/pacparser/issues/194#issuecomment-2262030966
|
||||
./fix-invalid-pointer-type.patch
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"NO_INTERNET=1"
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs tests/runtests.sh
|
||||
cd src
|
||||
|
@ -35,4 +44,4 @@ stdenv.mkDerivation rec {
|
|||
maintainers = with lib.maintainers; [ abbradar ];
|
||||
mainProgram = "pactester";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue