Skip to content
Permalink
Browse files

cryptlib: Fix build with clang from Xcode < 8

  • Loading branch information...
ryandesign committed Oct 9, 2019
1 parent 78ebdf2 commit c207d372b624fe658da245549fbb47fe2796292c
Showing with 14 additions and 0 deletions.
  1. +1 −0 devel/cryptlib/Portfile
  2. +13 −0 devel/cryptlib/files/apple_build_version.patch
@@ -56,6 +56,7 @@ pre-extract {
}
extract.mkdir yes

patchfiles-append apple_build_version.patch
patchfiles-append compiler.patch
patchfiles-append patch-makefile.diff

@@ -0,0 +1,13 @@
Fix build failure with Clangs from Xcode 7 and earlier.
This has been reported to the developer by email.
--- misc/consts.h.orig 2019-02-22 19:36:36.000000000 -0600
+++ misc/consts.h 2019-10-09 05:57:18.000000000 -0500
@@ -345,7 +345,7 @@
#define MIN_STORED_TIME_VALUE ( YEARS_TO_SECONDS( 1995 - 1970 ) )
#define MAX_TIME_VALUE ( YEARS_TO_SECONDS( 2036 - 1970 ) )

-#if ( defined( __clang__ ) && ( __clang_major__ > 5 ) ) || \
+#if ( defined( __clang__ ) && ( ( __clang_major__ > 5 && !defined(__apple_build_version__) ) || __apple_build_version__ >= 8000000 ) ) || \
( defined( __GNUC__ ) && ( __GNUC__ > 6 ) ) || \
( defined( _MSC_VER ) && VC_GE_2017( _MSC_VER ) )
#define CURRENT_TIME_VALUE ( ( DATE_YEAR + DATE_MONTH + DATE_DAY - 30 ) * 86400 )

0 comments on commit c207d37

Please sign in to comment.
You can’t perform that action at this time.