1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-06-19 19:50:31 -04:00
ports/devel/libubox/files/patch-utils.h
Martin Matuska 731f42e0a8 devel/libubox: fix the non-working fix to build on powerpc64
PR:             231496
Submitted by:   Piotr Kubaj <pkubaj@anongoth.pl>
2019-03-18 23:42:36 +00:00

20 lines
770 B
C

--- utils.h.orig 2018-09-19 23:05:31 UTC
+++ utils.h
@@ -121,7 +121,7 @@ int clock_gettime(int type, struct timespec *tv);
* This returns a constant expression while determining if an argument is
* a constant expression, most importantly without evaluating the argument.
*/
-#define __is_constant(x) \
+#define __is_it_constant(x) \
(sizeof(int) == sizeof(*(1 ? ((void*)((long)(x) * 0l)) : (int*)1)))
#define __eval_once(func, x) \
@@ -136,7 +136,7 @@ int clock_gettime(int type, struct timespec *tv);
#define __eval_safe(func, x) __eval_once(func, x)
#else
#define __eval_safe(func, x) \
- __builtin_choose_expr(__is_constant(x), \
+ __builtin_choose_expr(__is_it_constant(x), \
func(x), __eval_once(func, x))
#endif