summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-extended/libblockdev/files/0005-fix-a-clang-compiling-issue.patch111
-rw-r--r--meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb1
2 files changed, 112 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/libblockdev/files/0005-fix-a-clang-compiling-issue.patch b/meta-oe/recipes-extended/libblockdev/files/0005-fix-a-clang-compiling-issue.patch
new file mode 100644
index 0000000000..3818936087
--- /dev/null
+++ b/meta-oe/recipes-extended/libblockdev/files/0005-fix-a-clang-compiling-issue.patch
@@ -0,0 +1,111 @@
1From 9b4a7a4d0653b627d747e00d6b3ada2990caa1d3 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 9 Aug 2017 13:57:57 +0800
4Subject: [PATCH] fix a clang compiling issue
5
6[snip]
7../../../git/src/plugins/fs.c:2617:26: error: missing field 'start'
8initializer [-Werror,-Wmissing-field-initializers]
9 PedGeometry geom = {0};
10 ^
11../../../git/src/plugins/fs.c:2618:30: error: missing field 'start'
12initializer [-Werror,-Wmissing-field-initializers]
13 PedGeometry new_geom = {0};
14[snip]
15
16Fix typo s/enum libvk_packet_format format/enum libvk_secret secret_type/
17
18Upstream-Status: Submitted [https://github.com/storaged-project/libblockdev/pull/266]
19
20Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
21---
22 src/plugins/crypto.c | 6 +++---
23 src/plugins/fs.c | 4 ++--
24 src/plugins/part.c | 4 ++--
25 src/utils/exec.c | 2 +-
26 4 files changed, 8 insertions(+), 8 deletions(-)
27
28diff --git a/src/plugins/crypto.c b/src/plugins/crypto.c
29index 8fbce4f..7ee7cdc 100644
30--- a/src/plugins/crypto.c
31+++ b/src/plugins/crypto.c
32@@ -881,7 +881,7 @@ gboolean bd_crypto_tc_open (const gchar *device, const gchar *name, const guint8
33 gint ret = 0;
34 guint64 progress_id = 0;
35 gchar *msg = NULL;
36- struct crypt_params_tcrypt params = {0};
37+ struct crypt_params_tcrypt params = {NULL,0,NULL,0,NULL,NULL,NULL,0,0};
38
39 msg = g_strdup_printf ("Started opening '%s' TrueCrypt/VeraCrypt device", device);
40 progress_id = bd_utils_report_started (msg);
41@@ -999,7 +999,7 @@ static gchar *replace_char (gchar *str, gchar orig, gchar new) {
42 return str;
43 }
44
45-static gboolean write_escrow_data_file (struct libvk_volume *volume, struct libvk_ui *ui, enum libvk_packet_format format, const gchar *out_path,
46+static gboolean write_escrow_data_file (struct libvk_volume *volume, struct libvk_ui *ui, enum libvk_secret secret_type, const gchar *out_path,
47 CERTCertificate *cert, GError **error) {
48 gpointer packet_data = NULL;
49 gsize packet_data_size = 0;
50@@ -1008,7 +1008,7 @@ static gboolean write_escrow_data_file (struct libvk_volume *volume, struct libv
51 gsize bytes_written = 0;
52 GError *tmp_error = NULL;
53
54- packet_data = libvk_volume_create_packet_asymmetric_with_format (volume, &packet_data_size, format, cert,
55+ packet_data = libvk_volume_create_packet_asymmetric_with_format (volume, &packet_data_size, secret_type, cert,
56 ui, LIBVK_PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY, error);
57
58 if (!packet_data) {
59diff --git a/src/plugins/fs.c b/src/plugins/fs.c
60index c4b6ac8..647096d 100644
61--- a/src/plugins/fs.c
62+++ b/src/plugins/fs.c
63@@ -2614,8 +2614,8 @@ BDFSVfatInfo* bd_fs_vfat_get_info (const gchar *device, GError **error) {
64 */
65 gboolean bd_fs_vfat_resize (const gchar *device, guint64 new_size, GError **error) {
66 PedDevice *ped_dev = NULL;
67- PedGeometry geom = {0};
68- PedGeometry new_geom = {0};
69+ PedGeometry geom = {NULL, 0, 0, 0};
70+ PedGeometry new_geom = {NULL, 0, 0, 0};
71 PedFileSystem *fs = NULL;
72 PedSector start = 0;
73 PedSector length = 0;
74diff --git a/src/plugins/part.c b/src/plugins/part.c
75index 12d2ef7..d277688 100644
76--- a/src/plugins/part.c
77+++ b/src/plugins/part.c
78@@ -849,7 +849,7 @@ static PedPartition* add_part_to_disk (PedDevice *dev, PedDisk *disk, BDPartType
79 return NULL;
80 }
81
82- part = ped_partition_new (disk, type, NULL, geom->start, geom->end);
83+ part = ped_partition_new (disk, (PedPartitionType)type, NULL, geom->start, geom->end);
84 if (!part) {
85 set_parted_error (error, BD_PART_ERROR_FAIL);
86 g_prefix_error (error, "Failed to create new partition on device '%s'", dev->path);
87@@ -1427,7 +1427,7 @@ gboolean bd_part_set_part_flags (const gchar *disk, const gchar *part, guint64 f
88 PedPartition *ped_part = NULL;
89 const gchar *part_num_str = NULL;
90 gint part_num = 0;
91- guint64 i = 0;
92+ int i = 0;
93 gint status = 0;
94 gboolean ret = FALSE;
95 guint64 progress_id = 0;
96diff --git a/src/utils/exec.c b/src/utils/exec.c
97index 7ac44fd..0a3094c 100644
98--- a/src/utils/exec.c
99+++ b/src/utils/exec.c
100@@ -354,7 +354,7 @@ gboolean bd_utils_exec_and_report_progress (const gchar **argv, const BDExtraArg
101 GIOStatus io_status = G_IO_STATUS_NORMAL;
102 guint i = 0;
103 guint8 completion = 0;
104- GPollFD fds[2] = {{0}, {0}};
105+ GPollFD fds[2] = {{0,0,0}, {0,0,0}};
106 gboolean out_done = FALSE;
107 gboolean err_done = FALSE;
108 GString *stdout_data = g_string_new (NULL);
109--
1101.8.3.1
111
diff --git a/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb b/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
index 4806dcd695..2a923548ad 100644
--- a/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
+++ b/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/rhinstaller/libblockdev;branch=master \
16 file://0001-fix-configure-and-compile-failures.patch \ 16 file://0001-fix-configure-and-compile-failures.patch \
17 file://0002-remove-python2-support.patch \ 17 file://0002-remove-python2-support.patch \
18 file://0003-remove-dmraid-while-compiling-with-with-dm.patch \ 18 file://0003-remove-dmraid-while-compiling-with-with-dm.patch \
19 file://0005-fix-a-clang-compiling-issue.patch \
19" 20"
20SRC_URI_append_libc-musl = " \ 21SRC_URI_append_libc-musl = " \
21 file://0004-fix-compile-failure-against-musl-C-library.patch \ 22 file://0004-fix-compile-failure-against-musl-C-library.patch \