--- prnt/hpijs/context2.cpp.orig	2010-12-19 21:38:35.000000000 +0100
+++ prnt/hpijs/context2.cpp	2010-12-19 21:34:05.000000000 +0100
@@ -39,6 +39,7 @@
 //#include "bug.h"
 
 APDK_BEGIN_NAMESPACE
+
 extern ColorMatcher* Create_ColorMatcher
 (
     SystemServices* pSys,
@@ -49,6 +50,15 @@
 APDK_END_NAMESPACE
 
 APDK_BEGIN_NAMESPACE
+int APDK_strnlen (const char *s, int size)
+{ 
+  int i;
+ 
+  for (i = 0; i < size; i++)
+    if (s[i] == 0)
+      return i;
+  return size;
+}
 
 extern PAPER_SIZE MediaSizeToPaper(MediaSize msize);
 extern MediaSize PaperToMediaSize(PAPER_SIZE psize);
@@ -1300,7 +1310,7 @@
     {
         return UNSUPPORTED_PRINTER;
     }
-	if(0 == strnlen((const char *)pSS->strDevID, DevIDBuffSize))
+	if(0 == APDK_strnlen((const char *)pSS->strDevID, DevIDBuffSize))
 	{
 		strncpy((char *)pSS->strDevID,szDeviceId,DevIDBuffSize);
 	}

