From 54d66c9d3b6f08fd2917eb22afe7cc0fa8ced5a7 Mon Sep 17 00:00:00 2001
From: barracuda156 <vital.had@gmail.com>
Date: Mon, 21 Nov 2022 00:35:47 +0800
Subject: [PATCH] crc_stubs.c: abort instead of error on unsupported platforms

---
 src/crc_stubs.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/crc_stubs.c b/src/crc_stubs.c
index 70aa270..9477adb 100644
--- a/src/crc_stubs.c
+++ b/src/crc_stubs.c
@@ -13,7 +13,9 @@ static inline uint64_t crc64(uint64_t initial, uint64_t data)
 #elif defined(__SSE4_2__)
   return __builtin_ia32_crc32di(initial, data);
 #else
-#error "Target not supported"
+  /* Platform not supported, but we don't want to prevent the rest of the library from
+     building on it. This is a temporary solution. */
+  abort();
 #endif
 }
 #else // not ARCH_SIXTYFOUR
@@ -24,7 +26,9 @@ static inline uint32_t crc32(uint32_t initial, uint32_t data)
 #elif defined(__SSE4_2__)
    return __builtin_ia32_crc32si(initial, data);
 #else
-#error "Target not supported"
+  /* Platform not supported, but we don't want to prevent the rest of the library from
+     building on it. This is a temporary solution. */
+  abort();
 #endif
 }
 #endif // ARCH_SIXTYFOUR
@@ -45,7 +49,9 @@ static inline uint32_t crc32(uint32_t initial, uint32_t data)
 }
 #endif // ARCH_SIXTYFOUR
 #else
-  #error "Target not supported"
+  /* Platform not supported, but we don't want to prevent the rest of the library from
+     building on it. This is a temporary solution. */
+  abort();
   uint64_t crc64(uint64_t initial, uint64_t data);
   uint32_t crc32(uint32_t initial, uint32_t data);
 #endif
