diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-05-10 23:52:48 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-05-15 10:56:50 +0100 |
commit | 1eed078c4a042c3465df65cb8cc9040973422c9b (patch) | |
tree | 4486d37a713af8232c5a2864552a92cf72b48bc4 /meta | |
parent | 418b9d9ee7ce168186be433df942a95c5b16cfce (diff) | |
download | poky-1eed078c4a042c3465df65cb8cc9040973422c9b.tar.gz |
libxcrypt: Fix build with gcc8
Reported-by: Martin Jansa <martin.jansa@gmail.com>
(From OE-Core rev: b4aadf55b9e0979108875778c05915f96e0770aa)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/libxcrypt/libxcrypt/0001-disable-format-truncation-warning-with-gcc-8.patch | 36 | ||||
-rw-r--r-- | meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb | 4 |
2 files changed, 39 insertions, 1 deletions
diff --git a/meta/recipes-core/libxcrypt/libxcrypt/0001-disable-format-truncation-warning-with-gcc-8.patch b/meta/recipes-core/libxcrypt/libxcrypt/0001-disable-format-truncation-warning-with-gcc-8.patch new file mode 100644 index 0000000000..654eae6c6a --- /dev/null +++ b/meta/recipes-core/libxcrypt/libxcrypt/0001-disable-format-truncation-warning-with-gcc-8.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From c8c5908611e44a649489e8d217528fedc4864e14 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 10 May 2018 13:32:20 -0700 | ||
4 | Subject: [PATCH] disable format-truncation warning with gcc-8 | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | crypt-sunmd5.c | 6 ++++++ | ||
11 | 1 file changed, 6 insertions(+) | ||
12 | |||
13 | diff --git a/crypt-sunmd5.c b/crypt-sunmd5.c | ||
14 | index 4c85b7f..3e838cd 100644 | ||
15 | --- a/crypt-sunmd5.c | ||
16 | +++ b/crypt-sunmd5.c | ||
17 | @@ -151,6 +151,11 @@ getrounds (const char *s) | ||
18 | return ((uint32_t)val); | ||
19 | } | ||
20 | |||
21 | +#pragma GCC diagnostic push | ||
22 | +#if defined(__GNUC__) && (__GNUC__ >= 8) | ||
23 | +#pragma GCC diagnostic ignored "-Wformat-truncation" | ||
24 | +#endif | ||
25 | + | ||
26 | void | ||
27 | gensalt_sunmd5_rn (unsigned long count, | ||
28 | const uint8_t *rbytes, size_t nrbytes, | ||
29 | @@ -189,6 +194,7 @@ gensalt_sunmd5_rn (unsigned long count, | ||
30 | "$" CRYPT_ALGNAME "," ROUNDS "%u$%s$", | ||
31 | (unsigned int)count, rndstr); | ||
32 | } | ||
33 | +#pragma GCC diagnostic pop | ||
34 | |||
35 | void | ||
36 | crypt_sunmd5_rn (const char *phrase, const char *setting, | ||
diff --git a/meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb b/meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb index a1be4be7ef..8cc5edac49 100644 --- a/meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb +++ b/meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb | |||
@@ -12,7 +12,9 @@ inherit autotools | |||
12 | SRCREV ?= "215b32aa4e0b255c3356a96bd6d257661bad73ca" | 12 | SRCREV ?= "215b32aa4e0b255c3356a96bd6d257661bad73ca" |
13 | SRCBRANCH ?= "master" | 13 | SRCBRANCH ?= "master" |
14 | 14 | ||
15 | SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH}" | 15 | SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH} \ |
16 | file://0001-disable-format-truncation-warning-with-gcc-8.patch \ | ||
17 | " | ||
16 | 18 | ||
17 | PROVIDES = "virtual/crypt" | 19 | PROVIDES = "virtual/crypt" |
18 | 20 | ||