• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/assimp/0002-fix-compilation-on-BigEndian.patch
Peter SeidererPeter Seiderer committed 9ebac3bd05014 Jan 2016
Raw file
Source viewDiff to previous
 
1
From 8457f3eff89dae35d43f679a66842ceedfd08808 Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?=
3
 <zmoelnig@umlautQ.umlaeute.mur.at>
4
Date: Fri, 13 Nov 2015 22:33:20 +0100
5
Subject: [PATCH] fix compilation on BigEndian
6
​
7
cannot pass a function by reference where an lvalue is expected
8
(only applies to bigendian, where a macro expands to a byteswap function)
9
​
10
Closes https://github.com/assimp/assimp/issues/613
11
​
12
Taken from [1] for buildroot assimp package compile fix.
13
​
14
[1] https://github.com/assimp/assimp/commit/756cfd4f74b866e3183caede69daa8c105b73bab.patch
15
​
16
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
17
---
18
 code/Bitmap.cpp | 5 +++++
19
 1 file changed, 5 insertions(+)
20
​
21
diff --git a/code/Bitmap.cpp b/code/Bitmap.cpp
22
index 13ec372..829fd02 100644
23
--- a/code/Bitmap.cpp
24
+++ b/code/Bitmap.cpp
25
@@ -84,7 +84,12 @@ namespace Assimp {
26
 
27
     template<typename T>
28
     inline std::size_t Copy(uint8_t* data, T& field) {
29
+#ifdef AI_BUILD_BIG_ENDIAN
30
+        T field_swapped=AI_BE(field);
31
+        std::memcpy(data, &field_swapped, sizeof(field)); return sizeof(field);
32
+#else
33
         std::memcpy(data, &AI_BE(field), sizeof(field)); return sizeof(field);
34
+#endif
35
     }
36
 
37
     void Bitmap::WriteHeader(Header& header, IOStream* file) {
38
-- 
39
2.1.4
40
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.