summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Haag2018-08-01 00:21:20 +0200
committerChristoph Haag2018-08-01 00:21:20 +0200
commit50f9aea5999924f5ac33458239d08b40a6b6131e (patch)
tree73eda0450fc483b601fc85fe1f3e97ee5cc9cb2e
parent3bb6c25bcc00887449f0d5e6435d19140bb7837f (diff)
downloadaur-50f9aea5999924f5ac33458239d08b40a6b6131e.tar.gz
update pragma pack patch to pop pragma after the fix
it can break other struct alignments and lead to weird corruption
-rw-r--r--.SRCINFO4
-rw-r--r--0001-fix-VREvent_Data_t-union-in-c-header-and-add-pragma-.patch25
-rw-r--r--PKGBUILD2
3 files changed, 22 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c639f6576229..aa86bed57b1c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Mon Jul 30 17:17:44 UTC 2018
+# Tue Jul 31 22:21:17 UTC 2018
pkgbase = openvr-git
pkgdesc = API and runtime that allows access to VR hardware from multiple vendors. Contains API and samples. The runtime is under SteamVR in Tools on Steam.
pkgver = 1.0.16.r0.g6aacebd
@@ -26,7 +26,7 @@ pkgbase = openvr-git
md5sums = SKIP
md5sums = 7350517830b1a0038d30c6ad33b4bb39
md5sums = dfb4306bb93633e467862cd8990e6e79
- md5sums = 910bc58898a88de7e81df32a1b2f19f4
+ md5sums = 97bc5ddeee3f2005afdc32b689711131
pkgname = openvr-git
diff --git a/0001-fix-VREvent_Data_t-union-in-c-header-and-add-pragma-.patch b/0001-fix-VREvent_Data_t-union-in-c-header-and-add-pragma-.patch
index 815545503a76..d2d9b88244f5 100644
--- a/0001-fix-VREvent_Data_t-union-in-c-header-and-add-pragma-.patch
+++ b/0001-fix-VREvent_Data_t-union-in-c-header-and-add-pragma-.patch
@@ -1,18 +1,19 @@
-From 65b15ca1052bfb44fcede5c086eac97a3599482a Mon Sep 17 00:00:00 2001
+From 9633359e79d5347d5667d2f2b5b46c720c559601 Mon Sep 17 00:00:00 2001
From: Christoph Haag <christoph.haag@collabora.com>
Date: Mon, 30 Jul 2018 17:18:44 +0200
Subject: [PATCH] fix VREvent_Data_t union in c header and add pragma pack(
push, 4)
+v2: pop pragma pack after VrEvent_t
---
- headers/openvr_capi.h | 51 ++++++++++++++++++++++++++++---------------
- 1 file changed, 34 insertions(+), 17 deletions(-)
+ headers/openvr_capi.h | 56 ++++++++++++++++++++++++++++---------------
+ 1 file changed, 37 insertions(+), 19 deletions(-)
diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h
-index 1ee5a36..8052a33 100644
+index 1ee5a36..74c0fa6 100644
--- a/headers/openvr_capi.h
+++ b/headers/openvr_capi.h
-@@ -1966,24 +1966,41 @@ typedef struct COpenVRContext
+@@ -1966,25 +1966,41 @@ typedef struct COpenVRContext
intptr_t m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors *
} COpenVRContext;
@@ -63,14 +64,26 @@ index 1ee5a36..8052a33 100644
- VREvent_TouchPadMove_t touchPadMove;
- VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
-} VREvent_Data_t;
+-
+#if defined(__linux__) || defined(__APPLE__)
+// This structure was originally defined mis-packed on Linux, preserved for
+// compatibility.
+#pragma pack( push, 4 )
+#endif
-
/** An event posted by the server to all running applications */
struct VREvent_t
+ {
+@@ -1994,7 +2010,9 @@ struct VREvent_t
+ // event data must be the end of the struct as its size is variable
+ VREvent_Data_t data;
+ };
+-
++#if defined(__linux__) || defined(__APPLE__)
++#pragma pack( pop )
++#endif
+
+ typedef union
+ {
--
2.18.0
diff --git a/PKGBUILD b/PKGBUILD
index 9dd238dc717c..419832f5c5c2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,7 +20,7 @@ source=("git+https://github.com/ValveSoftware/openvr.git"
md5sums=('SKIP'
'7350517830b1a0038d30c6ad33b4bb39'
'dfb4306bb93633e467862cd8990e6e79'
- '910bc58898a88de7e81df32a1b2f19f4')
+ '97bc5ddeee3f2005afdc32b689711131')
pkgver() {
cd "$srcdir/openvr"