diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2017-01-10 14:59:34 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-10 14:59:34 -0800 |
| commit | fed2ffdfc688c8cd617d7fc8d97d74d28d733967 (patch) | |
| tree | 612f441df5baeba30aa9523e46ec415cda13051b /ports/libffi/export-global-data.patch | |
| parent | 40ffd65f0e36f4b448437637e214c2a3b083ec02 (diff) | |
| parent | 54918bc63af0e776d3419a402338ab156ea6f279 (diff) | |
| download | vcpkg-fed2ffdfc688c8cd617d7fc8d97d74d28d733967.tar.gz vcpkg-fed2ffdfc688c8cd617d7fc8d97d74d28d733967.zip | |
Merge pull request #509 from codicodi/add-ffi
Add libffi
Diffstat (limited to 'ports/libffi/export-global-data.patch')
| -rw-r--r-- | ports/libffi/export-global-data.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ports/libffi/export-global-data.patch b/ports/libffi/export-global-data.patch new file mode 100644 index 000000000..9d965f647 --- /dev/null +++ b/ports/libffi/export-global-data.patch @@ -0,0 +1,35 @@ +diff --git a/src/types.c b/src/types.c +index 0de5994..46c8d18 100644 +--- a/src/types.c ++++ b/src/types.c +@@ -31,6 +31,12 @@ + #include <ffi.h> + #include <ffi_common.h> + ++#ifdef FFI_EXPORT_DATA ++#define FFI_EXPORT __declspec(dllexport) ++#else ++#define FFI_EXPORT ++#endif ++ + /* Type definitions */ + + #define FFI_TYPEDEF(name, type, id) \ +@@ -38,7 +44,7 @@ struct struct_align_##name { \ + char c; \ + type x; \ + }; \ +-const ffi_type ffi_type_##name = { \ ++FFI_EXPORT const ffi_type ffi_type_##name = { \ + sizeof(type), \ + offsetof(struct struct_align_##name, x), \ + id, NULL \ +@@ -56,7 +62,7 @@ ffi_type ffi_type_##name = { \ + } + + /* Size and alignment are fake here. They must not be 0. */ +-const ffi_type ffi_type_void = { ++FFI_EXPORT const ffi_type ffi_type_void = { + 1, 1, FFI_TYPE_VOID, NULL + }; + |
