ale: fix x86_64 build.

This commit is contained in:
Jerome Duval
2017-01-22 11:44:54 +01:00
parent 917a2d0e8b
commit bbfc52761d
2 changed files with 34 additions and 5 deletions

View File

@@ -16,13 +16,15 @@ or watch:
http://www.youtube.com/watch?v=ZPv58AWWGRQ"
HOMEPAGE="http://github.com/czeidler/ALEditor"
srcGitRef="52a5a621e3c28fc04d46402fae263b9693bd68ab"
CHECKSUM_SHA256="cda6bc713485c058b326bc79231a99c24abad36e7d0b68a9cbbc2b292092e683"
SOURCE_FILENAME="ALEditor-52a5a621e3c28fc04d46402fae263b9693bd68ab.tar.gz"
SOURCE_DIR="ALEditor-$srcGitRef"
SOURCE_URI="https://github.com/czeidler/ALEditor/archive/$srcGitRef.tar.gz"
COPYRIGHT="2009-2014 UniAuckland Team"
LICENSE="MIT"
REVISION="2"
REVISION="3"
SOURCE_URI="https://github.com/czeidler/ALEditor/archive/$srcGitRef.tar.gz"
CHECKSUM_SHA256="cda6bc713485c058b326bc79231a99c24abad36e7d0b68a9cbbc2b292092e683"
SOURCE_FILENAME="ALEditor-$srcGitRef.tar.gz"
SOURCE_DIR="ALEditor-$srcGitRef"
PATCHES="ale-$portVersion.patchset"
ARCHITECTURES="x86 x86_gcc2 x86_64"
PROVIDES="

View File

@@ -0,0 +1,27 @@
From 9207fb694ded934de6a9f798fb793ecc96335375 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 22 Jan 2017 11:34:12 +0100
Subject: fix x86_64 build.
diff --git a/src/customization/Object.cpp b/src/customization/Object.cpp
index e1134a1..3690881 100644
--- a/src/customization/Object.cpp
+++ b/src/customization/Object.cpp
@@ -396,8 +396,13 @@ BObject::_GetEventConnections()
return fEventConnections;
EventConnections* eventConnections = new EventConnections;
+#if LONG_MAX == INT_MAX
if (atomic_test_and_set(reinterpret_cast<int32*>(&fEventConnections),
reinterpret_cast<int32>(eventConnections), 0) != 0)
+#else
+ if (atomic_test_and_set64(reinterpret_cast<int64*>(&fEventConnections),
+ reinterpret_cast<int64>(eventConnections), 0) != 0)
+#endif
delete eventConnections;
return fEventConnections;
}
--
2.10.2