blob: 0b5b809122489478a6e6f9b0b3be4e856a3dc70f [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From 59fbd57acd1df25b1972a131dc6a77a4fe147729 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 27 Jul 2017 10:45:02 +0800
4Subject: [PATCH] fix compile failure against musl C library
5
6Upstream-Status: Pending
7
8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
9---
10 src/plugins/crypto.c | 2 +-
11 src/plugins/part.c | 3 ++-
12 2 files changed, 3 insertions(+), 2 deletions(-)
13
14diff --git a/src/plugins/crypto.c b/src/plugins/crypto.c
Brad Bishop316dfdd2018-06-25 12:45:53 -040015index b961471..2d3d251 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050016--- a/src/plugins/crypto.c
17+++ b/src/plugins/crypto.c
18@@ -22,7 +22,7 @@
19 #include <libcryptsetup.h>
20 #include <nss.h>
21 #include <volume_key/libvolume_key.h>
22-#include <sys/fcntl.h>
23+#include <fcntl.h>
24 #include <sys/ioctl.h>
25 #include <linux/random.h>
26 #include <locale.h>
27diff --git a/src/plugins/part.c b/src/plugins/part.c
Brad Bishop316dfdd2018-06-25 12:45:53 -040028index 6b2a690..ab490d9 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050029--- a/src/plugins/part.c
30+++ b/src/plugins/part.c
31@@ -25,6 +25,7 @@
32 #include <inttypes.h>
33 #include <unistd.h>
34 #include <sys/file.h>
35+#include <fcntl.h>
Brad Bishop316dfdd2018-06-25 12:45:53 -040036 #include <sys/ioctl.h>
37 #include <linux/fs.h>
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038 #include <blockdev/utils.h>
Brad Bishop316dfdd2018-06-25 12:45:53 -040039@@ -1354,7 +1355,7 @@ static gboolean set_gpt_flags (const gchar *device, int part_num, guint64 flags,
Brad Bishopd7bf8c12018-02-25 22:55:05 -050040 real_flags |= 0x4000000000000000; /* 1 << 62 */
41 if (flags & BD_PART_FLAG_GPT_NO_AUTOMOUNT)
42 real_flags |= 0x8000000000000000; /* 1 << 63 */
43- mask_str = g_strdup_printf ("%.16"__PRI64_PREFIX"x", real_flags);
44+ mask_str = g_strdup_printf ("%.16"__PRI64"x", real_flags);
45
46 args[2] = g_strdup_printf ("%d:=:%s", part_num, mask_str);
47 g_free (mask_str);
48--
Brad Bishop316dfdd2018-06-25 12:45:53 -0400492.14.3
Brad Bishopd7bf8c12018-02-25 22:55:05 -050050