You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.8 KiB
60 lines
1.8 KiB
musl doesn't implement GLOB_BRACE, simply disable it.
|
|
|
|
https://bugs.gentoo.org/922286
|
|
https://github.com/rpm-software-management/rpm/issues/2844
|
|
--- a/rpmio/rpmglob.c
|
|
+++ b/rpmio/rpmglob.c
|
|
@@ -33,6 +33,10 @@
|
|
|
|
#include "debug.h"
|
|
|
|
+#ifndef GLOB_BRACE
|
|
+#define GLOB_BRACE 0
|
|
+#endif
|
|
+
|
|
/* Return 1 if pattern contains a magic char, see glob(7) for a list */
|
|
static int ismagic(const char *pattern)
|
|
{
|
|
|
|
From 57f3711846f44da0f37cbc5dd66e8fba80a3bee1 Mon Sep 17 00:00:00 2001
|
|
From: Panu Matilainen <pmatilai@redhat.com>
|
|
Date: Mon, 18 Dec 2023 12:25:04 +0200
|
|
Subject: [PATCH] Fix unconditional dependency on non-POSIX GLOB_ONLYDIR flag
|
|
|
|
This regressed when we axed our internal glob copy in commit
|
|
66fa46c006bae0f28d93238b8f7f1c923645eee5. Luckily GLOB_ONLYDIR is only
|
|
an optimization so we can just skip it if not available.
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -350,6 +350,7 @@ if (LIBDW_FOUND)
|
|
set(HAVE_LIBDW 1)
|
|
endif()
|
|
|
|
+check_symbol_exists(GLOB_ONLYDIR "glob.h" HAVE_GLOB_ONLYDIR)
|
|
check_symbol_exists(major "sys/sysmacros.h" MAJOR_IN_SYSMACROS)
|
|
if (NOT MAJOR_IN_SYSMACROS)
|
|
check_symbol_exists(major "sys/mkdev.h" MAJOR_IN_MKDEV)
|
|
--- a/config.h.in
|
|
+++ b/config.h.in
|
|
@@ -100,6 +100,7 @@
|
|
#cmakedefine HAVE_ZSTD @HAVE_ZSTD@
|
|
#cmakedefine HAVE___PROGNAME @HAVE___PROGNAME@
|
|
#cmakedefine HAVE___SECURE_GETENV @HAVE___SECURE_GETENV@
|
|
+#cmakedefine HAVE_GLOB_ONLYDIR @HAVE_GLOB_ONLYDIR@
|
|
#cmakedefine MAJOR_IN_MKDEV @MAJOR_IN_MKDEV@
|
|
#cmakedefine MAJOR_IN_SYSMACROS @MAJOR_IN_SYSMACROS@
|
|
#cmakedefine RUNDIR @rundir@
|
|
--- a/rpmio/rpmglob.c
|
|
+++ b/rpmio/rpmglob.c
|
|
@@ -84,8 +84,10 @@ int rpmGlobPath(const char * pattern, rpmglobFlags flags,
|
|
gflags |= GLOB_BRACE;
|
|
if (home != NULL && strlen(home) > 0)
|
|
gflags |= GLOB_TILDE;
|
|
+#if HAVE_GLOB_ONLYDIR
|
|
if (dir_only)
|
|
gflags |= GLOB_ONLYDIR;
|
|
+#endif
|
|
if (flags & RPMGLOB_NOCHECK)
|
|
gflags |= GLOB_NOCHECK;
|
|
|