diff options
-rw-r--r-- | swift-lang.spec | 6 | ||||
-rw-r--r-- | time-struct-redefined.patch | 10 |
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 |