#7 Fix implicit declaration of function 'open_temp_exec_file' (F40FTBFS)
Merged 5 months ago by fweimer. Opened 6 months ago by yselkowitz.
rpms/ yselkowitz/libffi rawhide  into  rawhide

@@ -0,0 +1,44 @@ 

+ From ce077e5565366171aa1b4438749b0922fce887a4 Mon Sep 17 00:00:00 2001

+ From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>

+ Date: Thu, 2 Feb 2023 14:46:29 +0000

+ Subject: [PATCH] Forward declare open_temp_exec_file (#764)

+ 

+ It's defined in closures.c and used in tramp.c.

+ Also declare it as an hidden symbol, as it should be.

+ 

+ Co-authored-by: serge-sans-paille <sguelton@mozilla.com>

+ ---

+  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 7e005b054..5f19b557f 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>

file modified
+4
@@ -13,6 +13,10 @@ 

  Source1:	ffi-multilib.h

  Source2:	ffitarget-multilib.h

  

+ # error: implicit declaration of function 'open_temp_exec_file'

+ # https://github.com/libffi/libffi/pull/764

+ Patch0:		0001-Forward-declare-open_temp_exec_file.patch

+ 

  BuildRequires: make

  BuildRequires: gcc

  %if %{without bootstrap}

May you please rebase against the merged upstream commit?

commit ce077e5565366171aa1b4438749b0922fce887a4
Author: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
Date:   Thu Feb 2 14:46:29 2023 +0000

    Forward declare open_temp_exec_file (#764)

    It's defined in closures.c and used in tramp.c.
    Also declare it as an hidden symbol, as it should be.

    Co-authored-by: serge-sans-paille <sguelton@mozilla.com>

rebased onto a7063fb

6 months ago

Pull-Request has been merged by fweimer

5 months ago