aboutsummaryrefslogtreecommitdiff
path: root/devel/esdl/files
diff options
context:
space:
mode:
authorJimmy Olgeni <olgeni@FreeBSD.org>2012-08-15 09:08:58 +0000
committerJimmy Olgeni <olgeni@FreeBSD.org>2012-08-15 09:08:58 +0000
commita85f8717dfb688f7c0cfb2e4df52fd2f26922995 (patch)
tree12a67bf443d3eb36db350e36d6585610e2fee20f /devel/esdl/files
parentd02f8eb009580daed482bf1d7e8743f06cad5f20 (diff)
downloadports-a85f8717dfb688f7c0cfb2e4df52fd2f26922995.tar.gz
ports-a85f8717dfb688f7c0cfb2e4df52fd2f26922995.zip
Notes
Diffstat (limited to 'devel/esdl/files')
-rw-r--r--devel/esdl/files/patch-c__src_esdl__driver.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/devel/esdl/files/patch-c__src_esdl__driver.c b/devel/esdl/files/patch-c__src_esdl__driver.c
new file mode 100644
index 000000000000..b80d7a86967b
--- /dev/null
+++ b/devel/esdl/files/patch-c__src_esdl__driver.c
@@ -0,0 +1,54 @@
+
+$FreeBSD$
+
+--- c_src/esdl_driver.c.orig
++++ c_src/esdl_driver.c
+@@ -34,11 +34,16 @@
+
+ #define TEMP_BINARY_SIZE 512
+
++#if ERL_DRV_EXTENDED_MAJOR_VERSION < 2
++typedef int ErlDrvSizeT;
++typedef int ErlDrvSSizeT;
++#endif
++
+ static ErlDrvData sdl_driver_start(ErlDrvPort port, char *buff);
+ static void sdl_driver_stop(ErlDrvData handle);
+ static void sdl_driver_finish(void);
+-static int sdl_driver_control(ErlDrvData handle, unsigned int command,
+- char* buf, int count, char** res, int res_size);
++static ErlDrvSSizeT sdl_driver_control(ErlDrvData handle, unsigned int command,
++ char* buf, ErlDrvSizeT count, char** res, ErlDrvSizeT res_size);
+ static void standard_outputv(ErlDrvData drv_data, ErlIOVec *ev);
+
+ /*
+@@ -59,6 +64,17 @@
+ sdl_driver_control, /* F_PTR control, port_control callback */
+ NULL, /* F_PTR timeout, reserved */
+ standard_outputv, /* F_PTR outputv, reserved */
++ NULL,
++ NULL,
++ NULL,
++ NULL,
++ ERL_DRV_EXTENDED_MARKER,
++ ERL_DRV_EXTENDED_MAJOR_VERSION,
++ ERL_DRV_EXTENDED_MINOR_VERSION,
++ 0,
++ NULL,
++ NULL,
++ NULL
+ };
+
+ DRIVER_INIT(sdl_driver)
+@@ -148,9 +164,9 @@
+ {
+ }
+
+-static int
++static ErlDrvSSizeT
+ sdl_driver_control(ErlDrvData handle, unsigned op,
+- char* buf, int count, char** res, int res_size)
++ char* buf, ErlDrvSizeT count, char** res, ErlDrvSizeT res_size)
+ {
+ sdl_data* sd = (sdl_data *) handle;
+ sdl_fun func;