aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2023-10-10 15:17:38 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2023-10-11 18:26:31 +0000
commitb7c9e0e4796ce3341fa3df7f508095e1705cc6e9 (patch)
tree0530a2d0fd2ffe3a49620fe9d78e0008c907f708
parentb749a7015c079b9f5720df0adc8133d3c1264484 (diff)
downloadports-b7c9e0e4796ce3341fa3df7f508095e1705cc6e9.tar.gz
ports-b7c9e0e4796ce3341fa3df7f508095e1705cc6e9.zip
devel/dyncall: fix build on powerpc
cc -O2 -pipe -fPIC -fstack-protector-strong -fno-strict-aliasing -I/wrkdirs/usr/ports/devel/dyncall/work/dyncall-1.4/./dyncallback/../dyncall -c dyncall_thunk.c -o dyncall_thunk.o In file included from dyncall_thunk.c:38: ./dyncall_thunk_ppc32_sysv.c:28:28: warning: parameter 'x' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] static unsigned short hi16(x) { return ( (unsigned short) (((unsigned int)x)>>16UL) ); } ^ ./dyncall_thunk_ppc32_sysv.c:28:23: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] static unsigned short hi16(x) { return ( (unsigned short) (((unsigned int)x)>>16UL) ); } ^ ./dyncall_thunk_ppc32_sysv.c:29:28: warning: parameter 'x' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] static unsigned short lo16(x) { return ( (unsigned short) ((unsigned int)x) ); } ^ ./dyncall_thunk_ppc32_sysv.c:29:23: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] static unsigned short lo16(x) { return ( (unsigned short) ((unsigned int)x) ); } ^ ./dyncall_thunk_ppc32_sysv.c:41:26: error: incompatible pointer to integer conversion passing 'DCThunk *' (aka 'struct DCThunk_ *') to parameter of type 'int' [-Wint-conversion] p->addr_self_hi = hi16(p); ^ ./dyncall_thunk_ppc32_sysv.c:43:26: error: incompatible pointer to integer conversion passing 'DCThunk *' (aka 'struct DCThunk_ *') to parameter of type 'int' [-Wint-conversion] p->addr_self_lo = lo16(p);
-rw-r--r--devel/dyncall/files/patch-dyncallback_dyncall__thunk__ppc32__sysv.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/devel/dyncall/files/patch-dyncallback_dyncall__thunk__ppc32__sysv.c b/devel/dyncall/files/patch-dyncallback_dyncall__thunk__ppc32__sysv.c
new file mode 100644
index 000000000000..88c56ccb381b
--- /dev/null
+++ b/devel/dyncall/files/patch-dyncallback_dyncall__thunk__ppc32__sysv.c
@@ -0,0 +1,13 @@
+--- dyncallback/dyncall_thunk_ppc32_sysv.c.orig 2023-10-10 15:09:47 UTC
++++ dyncallback/dyncall_thunk_ppc32_sysv.c
+@@ -25,8 +25,8 @@
+
+ #include "dyncall_thunk.h"
+
+-static unsigned short hi16(x) { return ( (unsigned short) (((unsigned int)x)>>16UL) ); }
+-static unsigned short lo16(x) { return ( (unsigned short) ((unsigned int)x) ); }
++static unsigned short hi16(DCThunk* x) { return ( (unsigned short) (((unsigned int)x)>>16UL) ); }
++static unsigned short lo16(DCThunk* x) { return ( (unsigned short) ((unsigned int)x) ); }
+
+ void dcbInitThunk(DCThunk* p, void (*entry)())
+ {