[glibc] elf: Fix tunconf.c build with clang

Adhemerval Zanella via Glibc-cvs <[email protected]>
Newsgroups gmane.comp.lib.glibc.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0113b90a91b3bf30b0aa3a0017ba77e7fabe58dd

commit 0113b90a91b3bf30b0aa3a0017ba77e7fabe58dd
Author: Adhemerval Zanella <[email protected]>
Date:   Tue Aug 11 09:30:06 2026 -0300

    elf: Fix tunconf.c build with clang
    
    clang enables -Wsingle-bit-bitfield-constant-conversion with -Werror
    and it triggers:
    
    tunconf.c:338:32: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
      338 |       entry->value_is_negative = 1;
    
    Change both value_is_negative and value_was_parsed to unsigned.
    
    Checked on x86_64-linux-gnu and i686-linux-gnu.

Diff:
---
 elf/tunconf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elf/tunconf.c b/elf/tunconf.c
index c27b50b1de..d4b2e541b5 100644
--- a/elf/tunconf.c
+++ b/elf/tunconf.c
@@ -66,8 +66,8 @@ struct tunable_entry_int {
   bool exclude_secure:1;
   bool exclude_nonsecure:1;
   int tunable_id;
-  int value_is_negative:1;
-  int value_was_parsed:1;
+  unsigned int value_is_negative:1;
+  unsigned int value_was_parsed:1;
   unsigned long long value_ull;
   signed long long value_sll;
   long filter_flags;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.