Created attachment 197248 [details] patch __is_constant macro is already defined in machine/endian.h. This patch renames this macro in libubox. Tested on CURRENT with powerpc64 and amd64.
A commit references this bug: Author: mm Date: Tue Oct 23 00:28:15 UTC 2018 New revision: 482806 URL: https://svnweb.freebsd.org/changeset/ports/482806 Log: devel/libubox: fix build on powerpc64 PR: 231496 Submitted by: Piotr Kubaj <pkubaj@anongoth.pl> Changes: head/devel/libubox/Makefile head/devel/libubox/files/ head/devel/libubox/files/patch-files_patch-utils.h head/devel/libubox/pkg-plist
It looks like you just pasted a raw patch into files. This port still doesn't build :/ root@talos:$/usr/ports/devel/libubox$ cat files/patch-files_patch-utils.h --- files/patch-utils.h.orig 2018-10-23 00:26:19 UTC +++ files/patch-utils.h @@ -0,0 +1,20 @@ +--- 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 +
A commit references this bug: Author: mm Date: Mon Mar 18 23:42:37 UTC 2019 New revision: 496226 URL: https://svnweb.freebsd.org/changeset/ports/496226 Log: devel/libubox: fix the non-working fix to build on powerpc64 PR: 231496 Submitted by: Piotr Kubaj <pkubaj@anongoth.pl> Changes: head/devel/libubox/Makefile head/devel/libubox/files/patch-files_patch-utils.h head/devel/libubox/files/patch-utils.h