diff -Paur --no-dereference -- libxml2.upstream/Makefile.in libxml2/Makefile.in
--- libxml2.upstream/Makefile.in
+++ libxml2/Makefile.in
@@ -688,7 +688,7 @@
 SUBDIRS = include . doc example xstc $(am__append_1) $(am__append_2)
 DIST_SUBDIRS = include . doc example fuzz python xstc
 AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include -DSYSCONFDIR='"$(sysconfdir)"'
-bin_SCRIPTS = xml2-config
+bin_SCRIPTS =
 lib_LTLIBRARIES = libxml2.la
 libxml2_la_CFLAGS = $(AM_CFLAGS) $(XML_PRIVATE_CFLAGS)
 libxml2_la_LIBADD = $(XML_PRIVATE_LIBS)
@@ -852,8 +852,6 @@
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 libxml2-config.cmake: $(top_builddir)/config.status $(srcdir)/libxml2-config.cmake.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
-xml2-config: $(top_builddir)/config.status $(srcdir)/xml2-config.in
-	cd $(top_builddir) && $(SHELL) ./config.status $@
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
 	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
diff -Paur --no-dereference -- libxml2.upstream/dict.c libxml2/dict.c
--- libxml2.upstream/dict.c
+++ libxml2/dict.c
@@ -20,6 +20,7 @@
 #include "libxml.h"
 
 #include <limits.h>
+#include <stdlib.h>
 #include <string.h>
 #include <time.h>
 
@@ -904,69 +905,17 @@
  * Pseudo-random generator
  */
 
-static xmlMutex xmlRngMutex;
-
-static unsigned globalRngState[2];
-
-#ifdef XML_THREAD_LOCAL
-static XML_THREAD_LOCAL int localRngInitialized = 0;
-static XML_THREAD_LOCAL unsigned localRngState[2];
-#endif
-
 ATTRIBUTE_NO_SANITIZE_INTEGER
 void
 xmlInitRandom(void) {
-    int var;
-
-    xmlInitMutex(&xmlRngMutex);
-
-    /* TODO: Get seed values from system PRNG */
-
-    globalRngState[0] = (unsigned) time(NULL) ^
-                        HASH_ROL((unsigned) (size_t) &xmlInitRandom, 8);
-    globalRngState[1] = HASH_ROL((unsigned) (size_t) &xmlRngMutex, 16) ^
-                        HASH_ROL((unsigned) (size_t) &var, 24);
 }
 
 void
 xmlCleanupRandom(void) {
-    xmlCleanupMutex(&xmlRngMutex);
-}
-
-ATTRIBUTE_NO_SANITIZE_INTEGER
-static unsigned
-xoroshiro64ss(unsigned *s) {
-    unsigned s0 = s[0];
-    unsigned s1 = s[1];
-    unsigned result = HASH_ROL(s0 * 0x9E3779BB, 5) * 5;
-
-    s1 ^= s0;
-    s[0] = HASH_ROL(s0, 26) ^ s1 ^ (s1 << 9);
-    s[1] = HASH_ROL(s1, 13);
-
-    return(result & 0xFFFFFFFF);
 }
 
 unsigned
 xmlRandom(void) {
-#ifdef XML_THREAD_LOCAL
-    if (!localRngInitialized) {
-        xmlMutexLock(&xmlRngMutex);
-        localRngState[0] = xoroshiro64ss(globalRngState);
-        localRngState[1] = xoroshiro64ss(globalRngState);
-        localRngInitialized = 1;
-        xmlMutexUnlock(&xmlRngMutex);
-    }
-
-    return(xoroshiro64ss(localRngState));
-#else
-    unsigned ret;
-
-    xmlMutexLock(&xmlRngMutex);
-    ret = xoroshiro64ss(globalRngState);
-    xmlMutexUnlock(&xmlRngMutex);
-
-    return(ret);
-#endif
+    return(arc4random());
 }
 
diff -Paur --no-dereference -- libxml2.upstream/doc/Makefile.in libxml2/doc/Makefile.in
--- libxml2.upstream/doc/Makefile.in
+++ libxml2/doc/Makefile.in
@@ -476,7 +476,7 @@
 	xmlcatalog.html \
 	xmllint.html
 
-dist_man_MANS = xml2-config.1 xmllint.1 xmlcatalog.1
+dist_man_MANS = xmllint.1 xmlcatalog.1
 EXTRA_DIST = \
 	apibuild.py \
 	libxml2-api.xml \
diff -Paur --no-dereference -- libxml2.upstream/nanoftp.c libxml2/nanoftp.c
--- libxml2.upstream/nanoftp.c
+++ libxml2/nanoftp.c
@@ -51,6 +51,18 @@
 #include <sys/socket.h>
 #endif
 
+#if defined(__sortix__)
+struct hostent
+{
+char* h_name;
+char** h_aliases;
+int h_addrtype;
+int h_length;
+char** h_addr_list;
+};
+#define gethostbyname(x) ((struct hostent*) NULL)
+#endif
+
 #include <libxml/xmlmemory.h>
 #include <libxml/parser.h>
 #include <libxml/xmlerror.h>
