libbsd: Branch 'main' - 3 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Mar 6 01:24:49 UTC 2024


 configure.ac    |    2 +-
 src/closefrom.c |    3 +++
 src/strtonum.c  |    1 +
 3 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit e848f5aa298158243bde1c657821a2cdcfc1f88d
Author: Duncan Overbruck <mail at duncano.de>
Date:   Tue Mar 5 17:02:32 2024 +0100

    strtonum: Do not abort on EINVAL from strtoi()
    
    With musl libc strtoimax(".", ...) returns EINVAL.
    
    Closes: !28
    Signed-off-by: Guillem Jover <guillem at hadrons.org>

diff --git a/src/strtonum.c b/src/strtonum.c
index 8d6faa1..f85f741 100644
--- a/src/strtonum.c
+++ b/src/strtonum.c
@@ -58,6 +58,7 @@ strtonum(const char *nptr, long long minval, long long maxval,
 		return rv;
 	case ECANCELED:
 	case ENOTSUP:
+	case EINVAL:
 		goto out;
 	case ERANGE:
 		if (*eptr)
commit ee63bca5258374c93ee2b34459f4ad0c08958daf
Author: Duncan Overbruck <mail at duncano.de>
Date:   Tue Mar 5 17:01:29 2024 +0100

    closefrom: Ignore files starting with dot when scanning /proc/self/fd
    
    Signed-off-by: Guillem Jover <guillem at hadrons.org>

diff --git a/src/closefrom.c b/src/closefrom.c
index 2df5d03..41c9668 100644
--- a/src/closefrom.c
+++ b/src/closefrom.c
@@ -153,6 +153,9 @@ closefrom_procfs(int lowfd)
 		const char *errstr;
 		int fd;
 
+		if (dent->d_name[0] == '.')
+			continue;
+
 		fd = strtonum(dent->d_name, lowfd, INT_MAX, &errstr);
 		if (errstr != NULL || fd == dirfd(dirp))
 			continue;
commit 9cbd935d92d1d5cd72af3c59bb933efa706441b0
Author: Guillem Jover <guillem at hadrons.org>
Date:   Wed Mar 6 02:12:56 2024 +0100

    build: Match also gnu* for GNU/Hurd on the glibc ABI selection
    
    The GNU/Hurd system does not specify a kernel part, so we need to match
    on both *-gnu* and gnu* (to avoid overmatching with just *gnu*).

diff --git a/configure.ac b/configure.ac
index 5a003e1..c7c2e13 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,7 +85,7 @@ abi_vis=unknown
 abi_wcsl=unknown
 
 AS_CASE([$host_os],
-  [*-gnu*], [
+  [*-gnu* | gnu*], [
     abi_accmode=yes
     # DROP: On glibc >= 2.36.
     #abi_arc4random=no


More information about the libbsd mailing list