Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

driver incompatibility with R15B #1

Open
moskovich opened this issue Feb 17, 2012 · 0 comments
Open

driver incompatibility with R15B #1

moskovich opened this issue Feb 17, 2012 · 0 comments

Comments

@moskovich
Copy link

R15B added driver version information. Here is a quick patch to fix this (and also another compiler warning).

diff --git a/c_src/iconv_drv.c b/c_src/iconv_drv.c
index f05ebc4..4b97183 100644
--- a/c_src/iconv_drv.c
+++ b/c_src/iconv_drv.c
@@ -278,7 +278,7 @@ static void iv_close(t_iconvdrv *iv, iconv_t cd)
     return;
 }

-static void iconvdrv_from_erlang(ErlDrvData drv_data, char *buf, int len)
+static void iconvdrv_from_erlang(ErlDrvData drv_data, char *buf, ErlDrvSizeT len)
 {
     t_iconvdrv *iv = (t_iconvdrv *) drv_data;
     char ignore = 0;
@@ -367,5 +367,8 @@ DRIVER_INIT(iconvdrv)
   iconvdrv_driver_entry.driver_name  = "iconv_drv";
   iconvdrv_driver_entry.finish       = NULL;
   iconvdrv_driver_entry.outputv      = NULL;
+  iconvdrv_driver_entry.extended_marker = ERL_DRV_EXTENDED_MARKER;
+  iconvdrv_driver_entry.major_version = ERL_DRV_EXTENDED_MAJOR_VERSION;
+  iconvdrv_driver_entry.minor_version = ERL_DRV_EXTENDED_MINOR_VERSION;
   return &iconvdrv_driver_entry;
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant