1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00

devel/ctypes.sh: Add missing patches

Add patches missing from last update.

PR:	265318
Fixes:	79f9679c7e
(cherry picked from commit 505d19cfee)
This commit is contained in:
Fernando Apesteguía 2022-08-17 18:40:36 +02:00
parent 1a028d3fb4
commit f8275f75cd
4 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,20 @@
--- configure.ac.orig 2020-07-08 18:26:35 UTC
+++ configure.ac
@@ -32,6 +32,7 @@ AC_CHECK_FUNCS([gelf_getehdr dwfl_version dl_iterate_p
disable_struct_support=yes;
AC_MSG_WARN([a function needed for struct support was not found])
])
+AC_CHECK_FUNCS([mempcpy])
AC_CHECK_HEADER_STDBOOL
AC_PROG_CC
AC_FUNC_ALLOCA
@@ -152,6 +153,9 @@ AS_IF([test "x$disable_struct_support" == "xyes"], [
AC_SUBST([struct], [struct])
AC_SUBST([sizeof], [sizeof])
])
+
+# replace include/config.h
+AC_DEFINE([ARRAY_VARS], [1], [Enable array variable support])
AC_SUBST([soext], [$shrext_cmds])
AC_CONFIG_FILES([Makefile src/Makefile ctypes.sh])

View File

@ -0,0 +1,13 @@
--- include/builtins.h.orig 2022-07-19 16:57:21 UTC
+++ include/builtins.h
@@ -18,7 +18,10 @@
along with Bash. If not, see <http://www.gnu.org/licenses/>.
*/
+#define ARRAY_VARS 1
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#if defined (HAVE_UNISTD_H)
# ifdef _MINIX

View File

@ -0,0 +1,11 @@
--- src/callback.c.orig 2022-07-19 17:26:18 UTC
+++ src/callback.c
@@ -82,7 +82,7 @@ static int generate_native_callback(WORD_LIST *list)
ffi_type *callbacktype;
char **proto;
char *resultname = "DLRETVAL";
- char opt;
+ int opt;
reset_internal_getopt();
while ((opt = internal_getopt(list, "d:n:")) != -1) {

View File

@ -0,0 +1,11 @@
--- src/unpack.c.orig 2022-07-19 16:33:30 UTC
+++ src/unpack.c
@@ -22,7 +22,7 @@
#include "types.h"
#include "shell.h"
-#if !defined(__GLIBC__) && !defined(__NEWLIB__)
+#if !defined(HAVE_MEMPCPY)
static inline void *mempcpy(void *dest, const void *src, size_t n)
{
memcpy(dest, src, n);