File: check-sse2-availability.patch

package info (click to toggle)
tinycbor 0.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 844 kB
  • sloc: ansic: 4,028; cpp: 3,392; makefile: 235; perl: 156; sh: 43
file content (18 lines) | stat: -rw-r--r-- 670 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Check for SSE2 availability to fix FTBFS on i386.
 Debian baseline is too old now.
Author: Shengqi Chen <harry@debian.org>
Forwarded: not-needed
Last-Update: 2025-02-26
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/cborinternal_p.h
+++ b/src/cborinternal_p.h
@@ -49,7 +49,7 @@
  * define this macro unconditionally when __STDC_WANT_IEC_60559_TYPES_EXT__
  * is defined (regardless of actual support for _Float16).
  */
-#  if FLT16_MANT_DIG > 0 || __FLT16_MANT_DIG__ > 0
+#  if defined(__SSE2__) && (FLT16_MANT_DIG > 0 || __FLT16_MANT_DIG__ > 0)
 static inline unsigned short encode_half(float x)
 {
     unsigned short h;