forked from ghuntley/denon-prime4
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch libffi to work with newer gcc.
Refs #59 and libffi/libffi#760.
- Loading branch information
Showing
3 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
...tions/board/inmusic/common/patches/libffi/3.4.4/Forward-declare-open-temp-exec-file.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
From cbfb9b436ab13e4b4aba867d061e11d7f89a351c Mon Sep 17 00:00:00 2001 | ||
From: serge-sans-paille <[email protected]> | ||
Date: Wed, 1 Feb 2023 18:09:25 +0100 | ||
Subject: [PATCH] Forward declare open_temp_exec_file | ||
|
||
It's defined in closures.c and used in tramp.c. | ||
Also declare it as an hidden symbol, as it should be. | ||
--- | ||
include/ffi_common.h | 4 ++++ | ||
src/tramp.c | 4 ++++ | ||
2 files changed, 8 insertions(+) | ||
|
||
diff --git a/include/ffi_common.h b/include/ffi_common.h | ||
index 2bd31b03d..c53a79493 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 b9d273a1a..c3f4c9933 100644 | ||
--- a/src/tramp.c | ||
+++ b/src/tramp.c | ||
@@ -39,6 +39,10 @@ | ||
#ifdef __linux__ | ||
#define _GNU_SOURCE 1 | ||
#endif | ||
+ | ||
+#include <ffi.h> | ||
+#include <ffi_common.h> | ||
+ | ||
#include <stdio.h> | ||
#include <unistd.h> | ||
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters