keyutils: fix build with llvm/clang (#104930)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Christian Kampka 2022-01-30 07:30:30 +01:00 committed by GitHub
parent ce60c22080
commit 6715796ae4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,28 @@
From 59d91e57d103fb4686d2f45ee3c688878244367a Mon Sep 17 00:00:00 2001
From: Christian Kampka <christian@kampka.net>
Date: Tue, 24 Nov 2020 22:12:40 +0100
Subject: [PATCH] Remove unused function 'after_eq'
---
keyctl_watch.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/keyctl_watch.c b/keyctl_watch.c
index a70a19a..c4ca7f7 100644
--- a/keyctl_watch.c
+++ b/keyctl_watch.c
@@ -47,11 +47,6 @@ static struct watch_notification_filter filter = {
},
};
-static inline bool after_eq(unsigned int a, unsigned int b)
-{
- return (signed int)(a - b) >= 0;
-}
-
static void consumer_term(int sig)
{
consumer_stop = 1;
--
2.28.0

View File

@ -21,6 +21,10 @@ stdenv.mkDerivation rec {
sha256 = "0wnvbjfrbk7rghd032z684l7vk7mhy3bd41zvhkrhgp3cd5id0bm";
})
./conf-symlink.patch
# This patch solves a duplicate symbol error when building with a clang stdenv
# Before removing this patch, please ensure the package still builds by running eg.
# nix-build -E 'with import ./. {}; pkgs.keyutils.override { stdenv = pkgs.llvmPackages_latest.stdenv; }'
./0001-Remove-unused-function-after_eq.patch
];
makeFlags = lib.optionals stdenv.hostPlatform.isStatic "NO_SOLIB=1";