-
Notifications
You must be signed in to change notification settings - Fork 21
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 | |---|---|---| | [abseil/abseil-cpp](https://togithub.com/abseil/abseil-cpp) | patch | `20240116.1` -> `20240116.2` | | [davea42/libdwarf-code](https://togithub.com/davea42/libdwarf-code) | patch | `0.9.1` -> `0.9.2` | | git://git.kernel.org/pub/scm/git/git.git | minor | `2.44.0` -> `2.45.0` | | git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git | minor | `2.39.3` -> `2.40.1` | | git://git.openssl.org/openssl.git | minor | `3.2.1` -> `3.3.0` | | git://git.savannah.gnu.org/coreutils.git | minor | `9.4` -> `9.5` | | [grpc/grpc-go](https://togithub.com/grpc/grpc-go) | minor | `v1.62.1` -> `v1.63.2` | | [https://gitlab.com/gnutls/gnutls.git](https://gitlab.com/gnutls/gnutls) | patch | `3.8.4` -> `3.8.5` | | [libbpf/libbpf](https://togithub.com/libbpf/libbpf) | minor | `v1.3.0` -> `v1.4.1` | | [protocolbuffers/protobuf](https://togithub.com/protocolbuffers/protobuf) | minor | `26.0` -> `26.1` | | [protocolbuffers/protobuf-go](https://togithub.com/protocolbuffers/protobuf-go) | minor | `v1.33.0` -> `v1.34.1` | | [python/cpython](https://togithub.com/python/cpython) | patch | `3.12.2` -> `3.12.3` | ``` Signed-off-by: Andrey Smirnov <[email protected]>
- Loading branch information
Showing
9 changed files
with
176 additions
and
44 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
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 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