File: endian_check_cpp_abort_on_ftbfs.patch

package info (click to toggle)
grfcodec 6.0.6-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,200 kB
  • sloc: cpp: 12,624; ansic: 748; makefile: 198; perl: 132; sh: 77
file content (18 lines) | stat: -rw-r--r-- 735 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Prevent infinite loop during build on endian_check failure
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922625
Forwarded: https://github.com/OpenTTD/grfcodec/pull/1
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922625

Index: grfcodec/Makefile
===================================================================
--- grfcodec.orig/Makefile
+++ grfcodec/Makefile
@@ -213,7 +213,7 @@ objs/$(ENDIAN_CHECK): src/endian_check.c
 
 src/endian.h: objs/$(ENDIAN_CHECK)
 	$(_E) [ENDIAN] Determining endianness
-	$(_C)objs/$(ENDIAN_CHECK) $(ENDIAN_PARAMS) > src/endian.h || rm src/endian.h
+	$(_C)objs/$(ENDIAN_CHECK) $(ENDIAN_PARAMS) > src/endian.h || { rm src/endian.h; exit 1; }
 
 FORCE:
 %_r: FORCE