File: cpu-agnostic-endianness.patch

package info (click to toggle)
tlsh 4.12.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,952 kB
  • sloc: cpp: 9,132; python: 1,603; java: 1,214; sh: 703; javascript: 467; ansic: 54; makefile: 27; sed: 9
file content (24 lines) | stat: -rw-r--r-- 821 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: Rely on __BYTE_ORDER__ regarding endianness
 rather than on a specific type of CPU. 
Author: Sven Geuer <sge@debian.org>
Bug: https://github.com/trendmicro/tlsh/issues/131
Forwarded: https://github.com/trendmicro/tlsh/pull/155
Last-Update: 2025-12-03
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/include/tlsh_impl.h
+++ b/include/tlsh_impl.h
@@ -139,12 +139,10 @@
         unsigned char checksum[TLSH_CHECKSUM_LEN];  // 1 to 3 bytes
         unsigned char Lvalue;                       // 1 byte
         union {
-#if defined(__SPARC) || defined(_AIX)
 		#pragma pack(1)
-#endif
         unsigned char QB;
             struct{
-#if defined(__SPARC) || defined(_AIX)
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
 		unsigned char Q2ratio : 4;
 		unsigned char Q1ratio : 4;
 #else