diff -Paur --no-dereference -- libxml2.upstream/dict.c libxml2/dict.c --- libxml2.upstream/dict.c +++ libxml2/dict.c @@ -139,15 +139,6 @@ */ static int xmlDictInitialized = 0; -#ifdef DICT_RANDOMIZATION -#ifdef HAVE_RAND_R -/* - * Internal data for random function, protected by xmlDictMutex - */ -static unsigned int rand_seed = 0; -#endif -#endif - /** * xmlInitializeDict: * @@ -181,14 +172,6 @@ return(0); xmlRMutexLock(xmlDictMutex); -#ifdef DICT_RANDOMIZATION -#ifdef HAVE_RAND_R - rand_seed = time(NULL); - rand_r(& rand_seed); -#else - srand(time(NULL)); -#endif -#endif xmlDictInitialized = 1; xmlRMutexUnlock(xmlDictMutex); return(1); @@ -196,19 +179,7 @@ #ifdef DICT_RANDOMIZATION int __xmlRandom(void) { - int ret; - - if (xmlDictInitialized == 0) - __xmlInitializeDict(); - - xmlRMutexLock(xmlDictMutex); -#ifdef HAVE_RAND_R - ret = rand_r(& rand_seed); -#else - ret = rand(); -#endif - xmlRMutexUnlock(xmlDictMutex); - return(ret); + return(arc4random_uniform(INT_MAX)); } #endif diff -Paur --no-dereference -- libxml2.upstream/Makefile.in libxml2/Makefile.in --- libxml2.upstream/Makefile.in +++ libxml2/Makefile.in @@ -444,7 +444,7 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/libxml-2.0-uninstalled.pc.in \ $(srcdir)/libxml-2.0.pc.in $(srcdir)/libxml.spec.in \ - $(srcdir)/libxml2-config.cmake.in $(srcdir)/xml2-config.in \ + $(srcdir)/libxml2-config.cmake.in \ COPYING NEWS TODO compile config.guess config.sub depcomp \ install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -728,7 +728,7 @@ DIST_SUBDIRS = include . doc example fuzz python xstc AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include AM_CFLAGS = $(EXTRA_CFLAGS) $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS) -bin_SCRIPTS = xml2-config +bin_SCRIPTS = lib_LTLIBRARIES = libxml2.la libxml2_la_LIBADD = $(ICU_LIBS) $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) @USE_VERSION_SCRIPT_FALSE@LIBXML2_VERSION_SCRIPT = @@ -756,7 +756,7 @@ DEPS = $(top_builddir)/libxml2.la LDADDS = $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) -man_MANS = xml2-config.1 libxml.3 +man_MANS = libxml.3 m4datadir = $(datadir)/aclocal m4data_DATA = libxml.m4 runtest_SOURCES = runtest.c @@ -851,11 +851,11 @@ runxmlconf_LDFLAGS = runxmlconf_DEPENDENCIES = $(DEPS) runxmlconf_LDADD = $(LDADDS) -CLEANFILES = runxmlconf.log test.out xml2Conf.sh *.gcda *.gcno *.res +CLEANFILES = runxmlconf.log test.out *.gcda *.gcno *.res DISTCLEANFILES = COPYING missing.lst confexecdir = $(libdir) -confexec_DATA = xml2Conf.sh -EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \ +confexec_DATA = +EXTRA_DIST = libxml.spec.in libxml2.spec \ libxml.m4 Copyright check-xml-test-suite.py gentest.py \ check-relaxng-test-suite.py check-relaxng-test-suite2.py \ check-xsddata-test-suite.py check-xinclude-test-suite.py \ @@ -947,8 +947,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=; \ @@ -3109,15 +3107,6 @@ rpm: cleanup cleantar @(unset CDPATH ; $(MAKE) dist-source dist && rpmbuild -ta $(distdir).tar.gz) -xml2Conf.sh: xml2Conf.sh.in Makefile - sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \ - -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \ - -e 's?\@VERSION\@?$(VERSION)?g' \ - -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \ - -e 's?\@XML_PRIVATE_LIBS\@?$(XML_PRIVATE_LIBS)?g' \ - < $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \ - && mv xml2Conf.tmp xml2Conf.sh - install-data-local: $(MKDIR_P) $(DESTDIR)$(docdir) -$(INSTALL) -m 0644 $(srcdir)/Copyright $(DESTDIR)$(docdir) diff -Paur --no-dereference -- libxml2.upstream/nanoftp.c libxml2/nanoftp.c --- libxml2.upstream/nanoftp.c +++ libxml2/nanoftp.c @@ -60,6 +60,18 @@ #include #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 #include #include diff -Paur --no-dereference -- libxml2.upstream/nanohttp.c libxml2/nanohttp.c --- libxml2.upstream/nanohttp.c +++ libxml2/nanohttp.c @@ -1124,7 +1124,7 @@ #if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32) else #endif -#if !defined(HAVE_GETADDRINFO) || !defined(_WIN32) +#if !defined(HAVE_GETADDRINFO) || (!defined(_WIN32) && !defined(__sortix__)) { struct hostent *h; struct in_addr ia;