summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRon Olson <tachoknight@gmail.com>2018-06-13 16:31:47 -0500
committerRon Olson <tachoknight@gmail.com>2018-06-13 16:31:47 -0500
commit5b47e0b8fb994c0fa71970e90d9e91e8966418b5 (patch)
tree2b2b204c26132b7e9c55b3fd1c2a035e25696907
parent2250addcd5d978e7114860c2a928a7c47d2a8117 (diff)
downloadswift-lang-5b47e0b8fb994c0fa71970e90d9e91e8966418b5.tar.gz
swift-lang-5b47e0b8fb994c0fa71970e90d9e91e8966418b5.tar.xz
swift-lang-5b47e0b8fb994c0fa71970e90d9e91e8966418b5.zip
Added patch to handle an error with redefinition of a time struct
-rw-r--r--swift-lang.spec6
-rw-r--r--time-struct-redefined.patch10
2 files changed, 16 insertions, 0 deletions
diff --git a/swift-lang.spec b/swift-lang.spec
index 7c73fa2..5ed57e5 100644
--- a/swift-lang.spec
+++ b/swift-lang.spec
@@ -23,9 +23,12 @@ Source11: https://github.com/apple/swift-cmark/archive/swift-%{swifttag}.t
Source12: https://github.com/apple/swift-xcode-playground-support/archive/swift-%{swifttag}.tar.gz#/swift-xcode-playground-support.tar.gz
Source13: swift-lang.conf
+
Patch0: %{name}-%{version}-change-lldb-location.patch
Patch1: compiler-rt-no-ustat.patch
Patch2: no-ninja-build.patch
+Patch3: time-struct-redefined.patch
+
BuildRequires: which
BuildRequires: clang
@@ -99,6 +102,9 @@ mv swift-xcode-playground-support-swift-%{swifttag} swift-xcode-playground-suppo
# Since we require ninja for building, there's no sense to rebuild it just for Swift
%patch2 -p0
+# Fixes an error in compiler-rt where the timespec struct is redefined
+%patch3 -p0
+
%build
export VERBOSE=1
diff --git a/time-struct-redefined.patch b/time-struct-redefined.patch
new file mode 100644
index 0000000..7c34def
--- /dev/null
+++ b/time-struct-redefined.patch
@@ -0,0 +1,10 @@
+--- ./compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc.orig 2018-06-13 13:38:58.569034787 -0500
++++ ./compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc 2018-06-13 13:39:14.866033724 -0500
+@@ -30,6 +30,7 @@
+ // fine with newer headers, too.
+ #include <linux/posix_types.h>
+ #if defined(__x86_64__) || defined(__mips__)
++#define _STRUCT_TIMESPEC
+ #include <sys/stat.h>
+ #else
+ #define ino_t __kernel_ino_t