$OpenBSD: patch-ext_dom_documenttype_c,v 1.1 2013/04/14 23:22:11 sthen Exp $

fix with libxml 2.9, adapted from
https://mail.gnome.org/archives/xml/2012-August/msg00028.html

--- ext/dom/documenttype.c.orig.port	Sun Apr 14 13:29:04 2013
+++ ext/dom/documenttype.c	Sun Apr 14 13:30:05 2013
@@ -215,7 +215,8 @@ int dom_documenttype_internal_subset_read(dom_object *
 		if (buff != NULL) {
 			xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 0, 0, NULL);
 			xmlOutputBufferFlush(buff);
-			ZVAL_STRINGL(*retval, buff->buffer->content, buff->buffer->use, 1);
+			ZVAL_STRINGL(*retval, xmlOutputBufferGetContent(buff),
+			    xmlOutputBufferGetSize(buff), 1); 
 			(void)xmlOutputBufferClose(buff);
 			return SUCCESS;
 		}
