[libffi] Fix undefined function error (#34404)

This commit is contained in:
jim wang 2023-10-13 11:12:32 +08:00 committed by GitHub
parent 19db77b44e
commit 88012347cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 2 deletions

View File

@ -0,0 +1,28 @@
diff --git a/include/ffi_common.h b/include/ffi_common.h
index 2bd31b0..c53a794 100644
--- a/include/ffi_common.h
+++ b/include/ffi_common.h
@@ -128,6 +128,10 @@ void *ffi_data_to_code_pointer (void *data) FFI_HIDDEN;
static trampoline. */
int ffi_tramp_is_present (void *closure) FFI_HIDDEN;
+/* Return a file descriptor of a temporary zero-sized file in a
+ writable and executable filesystem. */
+int open_temp_exec_file(void) FFI_HIDDEN;
+
/* Extended cif, used in callback from assembly routine */
typedef struct
{
diff --git a/src/tramp.c b/src/tramp.c
index b9d273a..90efb07 100644
--- a/src/tramp.c
+++ b/src/tramp.c
@@ -39,6 +39,8 @@
#ifdef __linux__
#define _GNU_SOURCE 1
#endif
+#include <ffi.h>
+#include <ffi_common.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

View File

@ -8,6 +8,7 @@ vcpkg_extract_source_archive(
ARCHIVE "${ARCHIVE}"
PATCHES
dll-bindir.diff
fix_undefind_func.patch
)
vcpkg_list(SET options)

View File

@ -1,7 +1,7 @@
{
"name": "libffi",
"version": "3.4.4",
"port-version": 5,
"port-version": 6,
"description": "Portable, high level programming interface to various calling conventions",
"homepage": "https://github.com/libffi/libffi",
"license": "MIT",

View File

@ -4158,7 +4158,7 @@
},
"libffi": {
"baseline": "3.4.4",
"port-version": 5
"port-version": 6
},
"libfido2": {
"baseline": "1.13.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "982248d325407b09d26ad0d929f67fd0b873f984",
"version": "3.4.4",
"port-version": 6
},
{
"git-tree": "db85488447cfda7bcc5e08452d8581ac0295b4c9",
"version": "3.4.4",