diff options
Diffstat (limited to 'meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-Change-program_name-to-have-const-attribute.patch')
-rw-r--r-- | meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-Change-program_name-to-have-const-attribute.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-Change-program_name-to-have-const-attribute.patch b/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-Change-program_name-to-have-const-attribute.patch new file mode 100644 index 000000000..845306292 --- /dev/null +++ b/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-Change-program_name-to-have-const-attribute.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From be694ba90aa2e0fed3a4e9b53ad7a61efd0430c5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 5 Jul 2024 23:18:07 -0700 | ||
4 | Subject: [PATCH 2/2] Change program_name to have const attribute | ||
5 | |||
6 | This is how it is used in all places and it also avoids a const to | ||
7 | non-const conversion warning | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/kmxz/overlayfs-tools/pull/26] | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | common.c | 2 +- | ||
14 | fsck.c | 2 +- | ||
15 | main.c | 2 +- | ||
16 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/common.c b/common.c | ||
19 | index eaf24a8..a15b66f 100644 | ||
20 | --- a/common.c | ||
21 | +++ b/common.c | ||
22 | @@ -29,7 +29,7 @@ | ||
23 | #include "common.h" | ||
24 | #include "config.h" | ||
25 | |||
26 | -char *program_name; | ||
27 | +const char *program_name; | ||
28 | |||
29 | /* #define DEBUG 1 */ | ||
30 | #ifdef DEBUG | ||
31 | diff --git a/fsck.c b/fsck.c | ||
32 | index 4e513f5..285b9f1 100644 | ||
33 | --- a/fsck.c | ||
34 | +++ b/fsck.c | ||
35 | @@ -46,7 +46,7 @@ | ||
36 | #include "mount.h" | ||
37 | #include "overlayfs.h" | ||
38 | |||
39 | -extern char *program_name; | ||
40 | +extern const char *program_name; | ||
41 | |||
42 | struct ovl_fs ofs = {}; | ||
43 | int flags = 0; /* user input option flags */ | ||
44 | diff --git a/main.c b/main.c | ||
45 | index ea0f5a5..1a8b239 100644 | ||
46 | --- a/main.c | ||
47 | +++ b/main.c | ||
48 | @@ -28,7 +28,7 @@ | ||
49 | bool verbose; | ||
50 | bool brief; | ||
51 | bool ignore; | ||
52 | -extern char *program_name; | ||
53 | +extern const char *program_name; | ||
54 | |||
55 | #ifndef __GLIBC__ | ||
56 | /* | ||