components/libffi/patches/1_raw_api.patch
author Ann Lai <ann.lai@oracle.com>
Fri, 07 Apr 2017 17:54:54 -0700
changeset 7850 b1ddd00f19fd
parent 7500 38effcff0d5d
permissions -rw-r--r--
25839325 pkglint is very unhappy with the boot/shim packages now-duplicate files

Raw API calls are not supported, since they are disabled in the Makefile 
for a fix to bug 22535919 which requires API calls to be disabled.
Removes the raw API functions if RAW API is not allowed.
Will attempt to send upstream.

--- libffi-3.2.1/libffi.pc.in_orig	2016-11-30 13:27:54.465013600 +0000
+++ libffi-3.2.1/libffi.pc.in	2016-11-30 13:28:43.661349542 +0000
@@ -8,4 +8,4 @@
 Description: Library supporting Foreign Function Interfaces
 Version: @PACKAGE_VERSION@
 Libs: -L${toolexeclibdir} -lffi
-Cflags: -I${includedir}
+Cflags: -I${includedir} -DFFI_NO_RAW_API
--- libffi-3.2.1/include/ffi.h.in.~1~	2014-11-08 04:47:24.000000000 +0000
+++ libffi-3.2.1/include/ffi.h.in	2016-11-30 17:29:52.630907951 +0000
@@ -282,14 +282,16 @@
 #endif
 
 
-void ffi_raw_call (ffi_cif *cif,
+#if !FFI_NO_RAW_API
+  void ffi_raw_call (ffi_cif *cif,
 		   void (*fn)(void),
 		   void *rvalue,
 		   ffi_raw *avalue);
 
-void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
-void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
-size_t ffi_raw_size (ffi_cif *cif);
+  void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
+  void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
+  size_t ffi_raw_size (ffi_cif *cif);
+#endif
 
 /* This is analogous to the raw API, except it uses Java parameter	*/
 /* packing, even on 64-bit machines.  I.e. on 64-bit machines		*/