-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some small fixes to make it compiple. Signed-off-by: Andrey Smirnov <[email protected]>
- Loading branch information
Showing
17 changed files
with
256 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
https://gitlab.alpinelinux.org/alpine/aports/-/raw/master/main/apparmor/libapparmor-basename.patch | ||
|
||
--- a/libraries/libapparmor/testsuite/test_multi.c | ||
+++ b/libraries/libapparmor/testsuite/test_multi.c | ||
@@ -1,5 +1,3 @@ | ||
-#define _GNU_SOURCE /* for glibc's basename version */ | ||
- | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
@@ -7,6 +5,11 @@ | ||
|
||
#include <aalogparse.h> | ||
|
||
+static const char *basename(const char *path) | ||
+{ | ||
+ return strrchr(path, '/') ? strrchr(path, '/')+1 : path; | ||
+} | ||
+ | ||
int print_results(aa_log_record *record); | ||
|
||
int main(int argc, char **argv) |
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,12 @@ | ||
https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/attr/attr-basename.patch | ||
|
||
diff -Naur a/tools/attr.c b/tools/attr.c | ||
--- a/tools/attr.c 2024-08-03 05:18:35.620953300 -0400 | ||
+++ b/tools/attr.c 2024-08-03 05:19:17.751848345 -0400 | ||
@@ -28,6 +28,7 @@ | ||
#include <errno.h> | ||
#include <string.h> | ||
#include <locale.h> | ||
+#include <libgen.h> | ||
|
||
#include <attr/attributes.h> |
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,49 @@ | ||
https://inbox.vuxu.org/musl/[email protected]/T/#mb470e2a6e72ed6f659b2d87bfa39eaac72057d4e | ||
|
||
From: Natanael Copa @ 2023-09-01 14:58 UTC (permalink / raw) | ||
To: musl; +Cc: Natanael Copa | ||
|
||
close_range() is a syscall present in FreeBSD 8.0 and Linux 5.9. glibc | ||
2.34 added a wrapper. | ||
|
||
Expose it under _GNU_SOURCE similar to what GNU libc does. Also expose | ||
it under _BSD_SOURCE since it is also a FreeBSD function. | ||
--- | ||
|
||
v2: use syscall without __syscall_ret | ||
|
||
include/unistd.h | 3 +++ | ||
src/linux/close_range.c | 8 ++++++++ | ||
2 files changed, 11 insertions(+) | ||
create mode 100644 src/linux/close_range.c | ||
|
||
diff --git a/include/unistd.h b/include/unistd.h | ||
index 5bc7f798..d89e3d4c 100644 | ||
--- a/include/unistd.h | ||
+++ b/include/unistd.h | ||
@@ -161,6 +161,9 @@ unsigned ualarm(unsigned, unsigned); | ||
#define L_INCR 1 | ||
#define L_XTND 2 | ||
int brk(void *); | ||
+#define CLOSE_RANGE_UNSHARE (1U << 1) | ||
+#define CLOSE_RANGE_CLOEXEC (1U << 2) | ||
+int close_range(unsigned int, unsigned int, int); | ||
void *sbrk(intptr_t); | ||
pid_t vfork(void); | ||
int vhangup(void); | ||
diff --git a/src/linux/close_range.c b/src/linux/close_range.c | ||
new file mode 100644 | ||
index 00000000..3f1378a0 | ||
--- /dev/null | ||
+++ b/src/linux/close_range.c | ||
@@ -0,0 +1,8 @@ | ||
+#define _GNU_SOURCE | ||
+#include <unistd.h> | ||
+#include "syscall.h" | ||
+ | ||
+int close_range(unsigned int first, unsigned int last, int flags) | ||
+{ | ||
+ return syscall(SYS_close_range, first, last, flags); | ||
+} | ||
-- | ||
2.42.0 |
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,32 @@ | ||
From 228032a9161072b3cfa803301a29398725890098 Mon Sep 17 00:00:00 2001 | ||
From: Paolo Pisati <[email protected]> | ||
Date: Wed, 31 Jul 2024 13:53:05 +0000 | ||
Subject: [PATCH] nv-vtophys: explicit a void cast | ||
|
||
Due to gcc-14 upgrade, implicit cast are treated as error: | ||
|
||
... | ||
./arch/arm64/include/asm/memory.h:425:66: error: passing argument 1 of ‘virt_to_pfn’ makes pointer from integer without a cast [-Wint-conversion] | ||
425 | __is_lm_address(__addr) && pfn_is_map_memory(virt_to_pfn(__addr)); | ||
... | ||
|
||
Signed-off-by: Paolo Pisati <[email protected]> | ||
--- | ||
nvidia/nv-vtophys.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/nvidia/nv-vtophys.c b/nvidia/nv-vtophys.c | ||
index df2a01e..fcae701 100644 | ||
--- a/nvidia/nv-vtophys.c | ||
+++ b/nvidia/nv-vtophys.c | ||
@@ -29,7 +29,7 @@ | ||
NvU64 NV_API_CALL nv_get_kern_phys_address(NvU64 address) | ||
{ | ||
/* direct-mapped kernel address */ | ||
- if (virt_addr_valid(address)) | ||
+ if (virt_addr_valid((void *)address)) | ||
return __pa(address); | ||
|
||
nv_printf(NV_DBG_ERRORS, | ||
-- | ||
2.45.2 |
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,32 @@ | ||
From 228032a9161072b3cfa803301a29398725890098 Mon Sep 17 00:00:00 2001 | ||
From: Paolo Pisati <[email protected]> | ||
Date: Wed, 31 Jul 2024 13:53:05 +0000 | ||
Subject: [PATCH] nv-vtophys: explicit a void cast | ||
|
||
Due to gcc-14 upgrade, implicit cast are treated as error: | ||
|
||
... | ||
./arch/arm64/include/asm/memory.h:425:66: error: passing argument 1 of ‘virt_to_pfn’ makes pointer from integer without a cast [-Wint-conversion] | ||
425 | __is_lm_address(__addr) && pfn_is_map_memory(virt_to_pfn(__addr)); | ||
... | ||
|
||
Signed-off-by: Paolo Pisati <[email protected]> | ||
--- | ||
nvidia/nv-vtophys.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/nvidia/nv-vtophys.c b/nvidia/nv-vtophys.c | ||
index df2a01e..fcae701 100644 | ||
--- a/nvidia/nv-vtophys.c | ||
+++ b/nvidia/nv-vtophys.c | ||
@@ -29,7 +29,7 @@ | ||
NvU64 NV_API_CALL nv_get_kern_phys_address(NvU64 address) | ||
{ | ||
/* direct-mapped kernel address */ | ||
- if (virt_addr_valid(address)) | ||
+ if (virt_addr_valid((void *)address)) | ||
return __pa(address); | ||
|
||
nv_printf(NV_DBG_ERRORS, | ||
-- | ||
2.45.2 |
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,32 @@ | ||
From 228032a9161072b3cfa803301a29398725890098 Mon Sep 17 00:00:00 2001 | ||
From: Paolo Pisati <[email protected]> | ||
Date: Wed, 31 Jul 2024 13:53:05 +0000 | ||
Subject: [PATCH] nv-vtophys: explicit a void cast | ||
|
||
Due to gcc-14 upgrade, implicit cast are treated as error: | ||
|
||
... | ||
./arch/arm64/include/asm/memory.h:425:66: error: passing argument 1 of ‘virt_to_pfn’ makes pointer from integer without a cast [-Wint-conversion] | ||
425 | __is_lm_address(__addr) && pfn_is_map_memory(virt_to_pfn(__addr)); | ||
... | ||
|
||
Signed-off-by: Paolo Pisati <[email protected]> | ||
--- | ||
nvidia/nv-vtophys.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/nvidia/nv-vtophys.c b/nvidia/nv-vtophys.c | ||
index df2a01e..fcae701 100644 | ||
--- a/nvidia/nv-vtophys.c | ||
+++ b/nvidia/nv-vtophys.c | ||
@@ -29,7 +29,7 @@ | ||
NvU64 NV_API_CALL nv_get_kern_phys_address(NvU64 address) | ||
{ | ||
/* direct-mapped kernel address */ | ||
- if (virt_addr_valid(address)) | ||
+ if (virt_addr_valid((void *)address)) | ||
return __pa(address); | ||
|
||
nv_printf(NV_DBG_ERRORS, | ||
-- | ||
2.45.2 |
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
Oops, something went wrong.