-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
``` | Package | Update | Change | |---|---|---| | [LINBIT/drbd](https://togithub.com/LINBIT/drbd) | patch | `9.2.8` -> `9.2.9` | | git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git | patch | `6.6.29` -> `6.6.30` | | git://git.kernel.org/pub/scm/utils/cryptsetup/cryptsetup.git | patch | `2.7.1` -> `2.7.2` | | git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git | minor | `2.39.3` -> `2.40.1` | | git://git.musl-libc.org/musl | patch | `1.2.4` -> `1.2.5` | | git://git.openssl.org/openssl.git | minor | `3.2.1` -> `3.3.0` | | https://github.com/google/gasket-driver.git | digest | `09385d4` -> `5815ee3` | | https://github.com/ipxe/ipxe.git | digest | `9bbe776` -> `d7e58c5` | ``` Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
- Loading branch information
Showing
13 changed files
with
215 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
Upstream PR #32 | ||
|
||
musl has removed the non-prototype declaration of basename from | ||
string.h [1] which now results in build errors with clang-17+ | ||
compiler. | ||
|
||
https://github.com/kmod-project/kmod/pull/32 | ||
|
||
--- | ||
|
||
diff -aur a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c | ||
--- a/libkmod/libkmod-config.c | ||
+++ b/libkmod/libkmod-config.c | ||
@@ -794,7 +794,7 @@ | ||
bool is_single = false; | ||
|
||
if (name == NULL) { | ||
- name = basename(path); | ||
+ name = gnu_basename(path); | ||
is_single = true; | ||
} | ||
|
||
diff -aur a/shared/util.c b/shared/util.c | ||
--- a/shared/util.c | ||
+++ b/shared/util.c | ||
@@ -172,9 +172,9 @@ | ||
|
||
char *path_to_modname(const char *path, char buf[static PATH_MAX], size_t *len) | ||
{ | ||
- char *modname; | ||
+ const char *modname; | ||
|
||
- modname = basename(path); | ||
+ modname = gnu_basename(path); | ||
if (modname == NULL || modname[0] == '\0') | ||
return NULL; | ||
|
||
diff -aur a/shared/util.h b/shared/util.h | ||
--- a/shared/util.h | ||
+++ b/shared/util.h | ||
@@ -5,6 +5,7 @@ | ||
#include <stdbool.h> | ||
#include <stdlib.h> | ||
#include <stdio.h> | ||
+#include <string.h> | ||
#include <sys/types.h> | ||
#include <sys/stat.h> | ||
#include <time.h> | ||
@@ -76,6 +77,12 @@ | ||
__p->__v = (val); \ | ||
} while(0) | ||
|
||
+static _always_inline_ const char *gnu_basename(const char *s) | ||
+{ | ||
+ const char *p = strrchr(s, '/'); | ||
+ return p ? p+1 : s; | ||
+} | ||
+ | ||
static _always_inline_ unsigned int ALIGN_POWER2(unsigned int u) | ||
{ | ||
return 1 << ((sizeof(u) * 8) - __builtin_clz(u - 1)); | ||
diff -aur a/testsuite/testsuite.c b/testsuite/testsuite.c | ||
--- a/testsuite/testsuite.c | ||
+++ b/testsuite/testsuite.c | ||
@@ -70,7 +70,7 @@ | ||
|
||
printf("Usage:\n" | ||
"\t%s [options] <test>\n" | ||
- "Options:\n", basename(progname)); | ||
+ "Options:\n", gnu_basename(progname)); | ||
|
||
for (itr = options, itr_short = options_short; | ||
itr->name != NULL; itr++, itr_short++) | ||
diff -aur a/tools/depmod.c b/tools/depmod.c | ||
--- a/tools/depmod.c | ||
+++ b/tools/depmod.c | ||
@@ -761,7 +761,7 @@ | ||
if (name != NULL) | ||
namelen = strlen(name); | ||
else { | ||
- name = basename(dir); | ||
+ name = gnu_basename(dir); | ||
namelen = strlen(name); | ||
dirlen -= namelen + 1; | ||
} | ||
diff -aur a/tools/kmod.c b/tools/kmod.c | ||
--- a/tools/kmod.c | ||
+++ b/tools/kmod.c | ||
@@ -68,7 +68,7 @@ | ||
"Options:\n" | ||
"\t-V, --version show version\n" | ||
"\t-h, --help show this help\n\n" | ||
- "Commands:\n", basename(argv[0])); | ||
+ "Commands:\n", gnu_basename(argv[0])); | ||
|
||
for (i = 0; i < ARRAY_SIZE(kmod_cmds); i++) { | ||
if (kmod_cmds[i]->help != NULL) { | ||
@@ -156,7 +156,7 @@ | ||
const char *cmd; | ||
size_t i; | ||
|
||
- cmd = basename(argv[0]); | ||
+ cmd = gnu_basename(argv[0]); | ||
|
||
for (i = 0; i < ARRAY_SIZE(kmod_compat_cmds); i++) { | ||
if (streq(kmod_compat_cmds[i]->name, cmd)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/libkmod/libkmod-util.c b/libkmod/libkmod-util.c | ||
index df12433..142e767 100644 | ||
--- a/shared/util.c | ||
+++ b/shared/util.c | ||
@@ -334,7 +334,9 @@ int mkdir_p(const char *path, int len, mode_t mode) | ||
{ | ||
char *start, *end; | ||
|
||
- start = strndupa(path, len); | ||
+ start = alloca(len+1); | ||
+ strncpy(start, path, len); | ||
+ start[len] = '\0'; | ||
end = start + len; | ||
|
||
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.