From 6fbe632bc43d693756170e5b799c942d6abbf883 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 11 Sep 2013 10:52:35 +0200 Subject: [PATCH] Add unsigned char cast for YAZ 4 --- src/yaz-z-assoc.cpp | 6 +++++- zlint/zlint.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/yaz-z-assoc.cpp b/src/yaz-z-assoc.cpp index 1663757..480074f 100644 --- a/src/yaz-z-assoc.cpp +++ b/src/yaz-z-assoc.cpp @@ -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; } diff --git a/zlint/zlint.cpp b/zlint/zlint.cpp index b8b8d59..323a393 100644 --- a/zlint/zlint.cpp +++ b/zlint/zlint.cpp @@ -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) -- 1.7.10.4