Add unsigned char cast for YAZ 4
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 11 Sep 2013 08:52:35 +0000 (10:52 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 11 Sep 2013 08:52:35 +0000 (10:52 +0200)
src/yaz-z-assoc.cpp
zlint/zlint.cpp

index 1663757..480074f 100644 (file)
@@ -451,7 +451,11 @@ Z_ReferenceId* Z_Assoc::getRefID(char* str)
     Z_ReferenceId* id = NULL;
 
     if (str)
-        id = odr_create_Odr_oct(m_p->odr_out, str, strlen(str));
+        id = odr_create_Odr_oct(m_p->odr_out, 
+#if YAZ_VERSIONL < 0x50000
+                                (unsigned char *)
+#endif
+                                str, strlen(str));
     return id;
 }
 
index b8b8d59..323a393 100644 (file)
@@ -150,7 +150,11 @@ IPDU_Observer *Zlint::sessionNotify(
 
 Z_ReferenceId *Zlint::mk_refid(const char *buf, int len)
 {
-    return odr_create_Odr_oct(odr_encode(), buf, len);
+    return odr_create_Odr_oct(odr_encode(),
+#if YAZ_VERSIONL < 0x50000
+                              (unsigned char *)
+#endif
+                              buf, len);
 }
 
 int Zlint::initResponseGetVersion(Z_InitResponse *init)