This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix compile failure on AArch64 Linux builds


Hi,

commit 5df384077f3633ec8cf2e08f9199e5a44994dbad (Merge pull request #129 from frida/fix/darwin-aarch64-cif-prep // Fix non-variadic CIF initialization for Apple/ARM64) breaks building libffi on aarch64 linux (e.g. aarch64-none-linux-gnu), with error:

../src/aarch64/ffi.c: In function 'ffi_prep_cif_machdep':
../src/aarch64/ffi.c:785:6: error: 'ffi_cif' has no member named 'aarch64_nfixedargs'
   cif->aarch64_nfixedargs = 0;
      ^
make[3]: *** [src/aarch64/ffi.lo] Error 1

Attached patch is a simple fix, tested on aarch64-none-linux-gnu. Is this OK for trunk (and if so, can someone with write access please commit)?

Thanks, Alan


diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c
index 5369ea4..cdb7816 100644
--- a/src/aarch64/ffi.c
+++ b/src/aarch64/ffi.c
@@ -782,7 +782,9 @@ ffi_prep_cif_machdep (ffi_cif *cif)
           }
     }
 
+#if defined (__APPLE__)
   cif->aarch64_nfixedargs = 0;
+#endif
 
   return FFI_OK;
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]