ALT Linux repos
Group :: Video
RPM: vlc
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: vlc-3.0.6-alt-e2k-lcc123.patch
Download
Download
diff -Naur vlc-3.0.6-orig/include/vlc_common.h vlc-3.0.6/include/vlc_common.h
--- vlc-3.0.6-orig/include/vlc_common.h 2019-04-07 20:38:17.000000000 +0000
+++ vlc-3.0.6/include/vlc_common.h 2019-05-05 15:36:25.165663592 +0000
@@ -657,7 +657,8 @@
/* Integer overflow */
static inline bool uadd_overflow(unsigned a, unsigned b, unsigned *res)
{
-#if VLC_GCC_VERSION(5,0) || defined(__clang__)
+#if VLC_GCC_VERSION(5,0) && !(defined __LCC__ && __LCC__ <= 123) \
+ || defined(__clang__)
return __builtin_uadd_overflow(a, b, res);
#else
*res = a + b;
@@ -668,7 +669,8 @@
static inline bool uaddl_overflow(unsigned long a, unsigned long b,
unsigned long *res)
{
-#if VLC_GCC_VERSION(5,0) || defined(__clang__)
+#if VLC_GCC_VERSION(5,0) && !(defined __LCC__ && __LCC__ <= 123) \
+ || defined(__clang__)
return __builtin_uaddl_overflow(a, b, res);
#else
*res = a + b;
@@ -679,7 +681,8 @@
static inline bool uaddll_overflow(unsigned long long a, unsigned long long b,
unsigned long long *res)
{
-#if VLC_GCC_VERSION(5,0) || defined(__clang__)
+#if VLC_GCC_VERSION(5,0) && !(defined __LCC__ && __LCC__ <= 123) \
+ || defined(__clang__)
return __builtin_uaddll_overflow(a, b, res);
#else
*res = a + b;
@@ -712,13 +715,15 @@
}
#endif
-#if !(VLC_GCC_VERSION(5,0) || defined(__clang__))
+#if !(VLC_GCC_VERSION(5,0) || defined(__clang__)) || \
+ (defined __LCC__ && __LCC__ <= 123)
# include <limits.h>
#endif
static inline bool umul_overflow(unsigned a, unsigned b, unsigned *res)
{
-#if VLC_GCC_VERSION(5,0) || defined(__clang__)
+#if VLC_GCC_VERSION(5,0) && !(defined __LCC__ && __LCC__ <= 123) \
+ || defined(__clang__)
return __builtin_umul_overflow(a, b, res);
#else
*res = a * b;
@@ -729,7 +734,8 @@
static inline bool umull_overflow(unsigned long a, unsigned long b,
unsigned long *res)
{
-#if VLC_GCC_VERSION(5,0) || defined(__clang__)
+#if VLC_GCC_VERSION(5,0) && !(defined __LCC__ && __LCC__ <= 123) \
+ || defined(__clang__)
return __builtin_umull_overflow(a, b, res);
#else
*res = a * b;
@@ -740,7 +746,8 @@
static inline bool umulll_overflow(unsigned long long a, unsigned long long b,
unsigned long long *res)
{
-#if VLC_GCC_VERSION(5,0) || defined(__clang__)
+#if VLC_GCC_VERSION(5,0) && !(defined __LCC__ && __LCC__ <= 123) \
+ || defined(__clang__)
return __builtin_umulll_overflow(a, b, res);
#else
*res = a * b;