VirtualBox

Changeset 104237 in vbox for trunk


Ignore:
Timestamp:
Apr 8, 2024 6:49:38 PM (10 months ago)
Author:
vboxsync
Message:

libs/libxml2-2.12.6: Try fixing the solaris builds where gcc chokes on the way the RNG is seeded, use our own IPRT API to get at a random value in xmlRandom(), bugref:10640

Location:
trunk/src/libs/libxml2-2.12.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/libxml2-2.12.6/dict.c

    r104106 r104237  
    3131#include <libxml/xmlmemory.h>
    3232#include <libxml/xmlstring.h>
     33
     34#ifdef VBOX
     35# include <iprt/rand.h>
     36#endif
    3337
    3438#ifndef SIZE_MAX
     
    901905}
    902906
     907#ifndef VBOX
    903908/*
    904909 * Pseudo-random generator
     
    947952    return(result & 0xFFFFFFFF);
    948953}
     954#endif
    949955
    950956unsigned
    951957xmlRandom(void) {
     958#ifndef VBOX
    952959#ifdef XML_THREAD_LOCAL
    953960    if (!localRngInitialized) {
     
    969976    return(ret);
    970977#endif
    971 }
    972 
     978#else
     979    return RTRandU32();
     980#endif
     981}
     982
  • trunk/src/libs/libxml2-2.12.6/threads.c

    r104106 r104237  
    586586        xmlInitMemoryInternal(); /* Should come second */
    587587        xmlInitGlobalsInternal();
     588#ifndef VBOX
    588589        xmlInitRandom();
     590#endif
    589591        xmlInitDictInternal();
    590592        xmlInitEncodingInternal();
     
    651653
    652654    xmlCleanupDictInternal();
     655#ifndef VBOX
    653656    xmlCleanupRandom();
     657#endif
    654658    xmlCleanupGlobalsInternal();
    655659    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette