nss_pam_ldapd: fix C23 compatibility

Rename 'bool' variable to 'value' in print_boolean() function since
'bool' is now a reserved keyword in C23.

Upstream patch: https://bugs.debian.org/1097481

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Reno Reckling
2026-01-08 01:00:16 +01:00
co-authored by Claude Opus 4.5
parent 16c7794d0a
commit e7ecdaecb3
2 changed files with 36 additions and 0 deletions
@@ -0,0 +1,31 @@
From 8ddb983a546f632986a84a784c4625110f7782a2 Mon Sep 17 00:00:00 2001
From: Arthur de Jong <arthur@arthurdejong.org>
Date: Sun, 23 Feb 2025 15:22:38 +0100
Subject: Fix variable name (bool) which is a keyword in C23
Closes https://bugs.debian.org/1097481
---
nslcd/cfg.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/nslcd/cfg.c b/nslcd/cfg.c
index ded797a..b984b0e 100644
--- a/nslcd/cfg.c
+++ b/nslcd/cfg.c
@@ -207,10 +207,10 @@ static int get_boolean(const char *filename, int lnr,
return parse_boolean(filename, lnr, token);
}
-static const char *print_boolean(int bool)
+static const char *print_boolean(int value)
{
- if (bool) return "yes";
- else return "no";
+ if (value) return "yes";
+ else return "no";
}
#define TIME_MINUTES 60
--
cgit v1.2.3
@@ -19,6 +19,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-4BeE4Xy1M7tmvQYB4gXnhSY0RcPC33pvkCMqtBMccW0=";
};
patches = [
# Fix C23 compatibility: rename 'bool' variable which is now a keyword
./fix-bool-c23-keyword.patch
];
nativeBuildInputs = [
pkg-config
makeWrapper