libbsd: Branch 'main' - 3 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 8 10:26:35 UTC 2022


 man/libbsd.7          |    3 ++-
 src/getentropy_hurd.c |    6 +++---
 src/local-elf.h       |    2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 873639ebb5bc3688e5e78d71e5c0c49469498f46
Author: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Date:   Tue Jun 7 19:27:13 2022 +0200

    Fix ELF support for big endian SH
    
    Fix the following build failure with big endian SH (e.g. sh4aeb):
    
      ,---
      In file included from nlist.c:44:
      nlist.c: In function '__elf_is_okay__':
      local-elf.h:223:25: error: 'ELFDATA2LMSB' undeclared (first use in this function); did you mean 'ELFDATA2LSB'?
        223 | #define ELF_TARG_DATA   ELFDATA2LMSB
            |                         ^~~~~~~~~~~~
      `---
    
    Fixes: http://autobuild.buildroot.org/results/2980fb79c208454195d77383f1ece9afbd7f981b
    Closes: !19
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
    Signed-off-by: Guillem Jover <guillem at hadrons.org>

diff --git a/src/local-elf.h b/src/local-elf.h
index 1dd3b42..8c4794f 100644
--- a/src/local-elf.h
+++ b/src/local-elf.h
@@ -230,7 +230,7 @@
 #if defined(__LITTLE_ENDIAN__)
 #define ELF_TARG_DATA	ELFDATA2LSB
 #elif defined(__BIG_ENDIAN__)
-#define ELF_TARG_DATA	ELFDATA2LMSB
+#define ELF_TARG_DATA	ELFDATA2MSB
 #else
 #error Unknown SH endianness
 #endif
commit c9c78fdfd0f8551dceec4f26a007ae14bec0e5b7
Author: Guillem Jover <guillem at hadrons.org>
Date:   Mon Apr 4 11:49:52 2022 +0200

    man: Use -compact also for alternative functions in libbsd(7)
    
    The other function lists use the compact mode, let's be uniform about
    this.

diff --git a/man/libbsd.7 b/man/libbsd.7
index ff1ef1f..869dfa9 100644
--- a/man/libbsd.7
+++ b/man/libbsd.7
@@ -134,7 +134,8 @@ originated from, and these various implementations provided are selectable
 at build-time.
 .Pp
 This is the list of functions that provide multiple implementations:
-.Bl -tag -width 4m
+.Pp
+.Bl -tag -width 4m -compact
 .It Fn strnvis 3
 .It Fn strnunvis 3
 .Nx
commit 5f21307570dff129c2e982a3ab8640d09302b2bf
Author: Guillem Jover <guillem at hadrons.org>
Date:   Thu Mar 31 20:46:56 2022 +0200

    getentropy: Fix function cast for getauxval()
    
    Fix also the Hurd implementation, missed in the original fix.
    
    Extends: commit 72a82ee262795c9162e712885381a111fcf988bc
    Warned-by: gcc

diff --git a/src/getentropy_hurd.c b/src/getentropy_hurd.c
index 2f76baa..8f2ba16 100644
--- a/src/getentropy_hurd.c
+++ b/src/getentropy_hurd.c
@@ -415,17 +415,17 @@ getentropy_fallback(void *buf, size_t len)
 #ifdef HAVE_GETAUXVAL
 #ifdef AT_RANDOM
 		/* Not as random as you think but we take what we are given */
-		p = (char *) getauxval(AT_RANDOM);
+		p = (char *) ((intptr_t) getauxval(AT_RANDOM));
 		if (p)
 			HR(p, 16);
 #endif
 #ifdef AT_SYSINFO_EHDR
-		p = (char *) getauxval(AT_SYSINFO_EHDR);
+		p = (char *) ((intptr_t) getauxval(AT_SYSINFO_EHDR));
 		if (p)
 			HR(p, pgs);
 #endif
 #ifdef AT_BASE
-		p = (char *) getauxval(AT_BASE);
+		p = (char *) ((intptr_t) getauxval(AT_BASE));
 		if (p)
 			HD(p);
 #endif


More information about the libbsd mailing list