[oe-commits] [openembedded-core] 41/46: libxcrypt: Fix build with gcc8
git at git.openembedded.org
git at git.openembedded.org
Tue May 15 09:58:10 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit b4aadf55b9e0979108875778c05915f96e0770aa
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Thu May 10 23:52:48 2018 -0700
libxcrypt: Fix build with gcc8
Reported-by: Martin Jansa <martin.jansa at gmail.com>
Signed-off-by: Khem Raj <raj.khem at gmail.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
...able-format-truncation-warning-with-gcc-8.patch | 36 ++++++++++++++++++++++
meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb | 4 ++-
2 files changed, 39 insertions(+), 1 deletion(-)
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 0000000..654eae6
--- /dev/null
+++ b/meta/recipes-core/libxcrypt/libxcrypt/0001-disable-format-truncation-warning-with-gcc-8.patch
@@ -0,0 +1,36 @@
+From c8c5908611e44a649489e8d217528fedc4864e14 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Thu, 10 May 2018 13:32:20 -0700
+Subject: [PATCH] disable format-truncation warning with gcc-8
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ crypt-sunmd5.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/crypt-sunmd5.c b/crypt-sunmd5.c
+index 4c85b7f..3e838cd 100644
+--- a/crypt-sunmd5.c
++++ b/crypt-sunmd5.c
+@@ -151,6 +151,11 @@ getrounds (const char *s)
+ return ((uint32_t)val);
+ }
+
++#pragma GCC diagnostic push
++#if defined(__GNUC__) && (__GNUC__ >= 8)
++#pragma GCC diagnostic ignored "-Wformat-truncation"
++#endif
++
+ void
+ gensalt_sunmd5_rn (unsigned long count,
+ const uint8_t *rbytes, size_t nrbytes,
+@@ -189,6 +194,7 @@ gensalt_sunmd5_rn (unsigned long count,
+ "$" CRYPT_ALGNAME "," ROUNDS "%u$%s$",
+ (unsigned int)count, rndstr);
+ }
++#pragma GCC diagnostic pop
+
+ void
+ 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 a1be4be..8cc5eda 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
SRCREV ?= "215b32aa4e0b255c3356a96bd6d257661bad73ca"
SRCBRANCH ?= "master"
-SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH}"
+SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH} \
+ file://0001-disable-format-truncation-warning-with-gcc-8.patch \
+ "
PROVIDES = "virtual/crypt"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list