1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-24 21:33:51 +03:00

dict: Include unistd.h for getentropy

This commit is contained in:
Nick Wellnhofer 2024-02-14 13:58:14 +01:00
parent c444c96e20
commit 595ee5bc1d

25
dict.c
View File

@ -23,16 +23,6 @@
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#ifdef HAVE_SYS_RANDOM_H
#include <sys/random.h>
#endif
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <bcrypt.h>
#endif
#include "private/dict.h"
#include "private/globals.h"
@ -916,6 +906,21 @@ xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) {
* Pseudo-random generator
*/
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <bcrypt.h>
#elif defined(HAVE_GETENTROPY)
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_RANDOM_H
#include <sys/random.h>
#endif
#else
#include <time.h>
#endif
static xmlMutex xmlRngMutex;
static unsigned globalRngState[2];