libksba: allow header files to be parsed by gcc2. (#2133)

This commit is contained in:
fbrosson
2018-01-17 22:03:45 +00:00
parent ca8ece71b6
commit d62923c7a9
2 changed files with 30 additions and 1 deletions

View File

@@ -5,9 +5,10 @@ implemented protocols and presents the data in a consistent way."
HOMEPAGE="https://www.gnupg.org/related_software/libksba/"
COPYRIGHT="2001-2015 g10 Code GmbH"
LICENSE="GNU GPL v3"
REVISION="2"
REVISION="3"
SOURCE_URI="https://www.gnupg.org/ftp/gcrypt/libksba/libksba-$portVersion.tar.bz2"
CHECKSUM_SHA256="41444fd7a6ff73a79ad9728f985e71c9ba8cd3e5e53358e70d5f066d35c1a340"
PATCHES="libksba-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

View File

@@ -0,0 +1,28 @@
From 97f2d3a350da038fa9d11a65384a82538f0415fb Mon Sep 17 00:00:00 2001
From: fbrosson <fbrosson@localhost>
Date: Wed, 17 Jan 2018 22:03:45 +0000
Subject: Do not use __GNUC_PATCHLEVEL__ if it's not defined.
diff --git a/src/ksba.h b/src/ksba.h
index 955dc06..b052783 100644
--- a/src/ksba.h
+++ b/src/ksba.h
@@ -45,9 +45,14 @@ extern "C" {
/* Check for compiler features. */
#ifdef __GNUC__
+#ifdef __GNUC_PATCHLEVEL__
#define _KSBA_GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
+#else
+#define _KSBA_GCC_VERSION (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100)
+#endif
#if _KSBA_GCC_VERSION > 30100
#define _KSBA_DEPRECATED __attribute__ ((__deprecated__))
#endif
--
2.15.1