mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Changes to compat/getentropy_solaris.c for,
ifdef stdint.h inclusion for older systems. ifdef sha2.h inclusion for older systems.
This commit is contained in:
parent
d68ece28c4
commit
8686b0abbf
2 changed files with 14 additions and 0 deletions
|
|
@ -16,6 +16,7 @@
|
||||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
@ -29,7 +30,9 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#ifdef HAVE_STDINT_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
@ -38,10 +41,14 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#ifdef HAVE_SYS_SHA2_H
|
||||||
#include <sys/sha2.h>
|
#include <sys/sha2.h>
|
||||||
#define SHA512_Init SHA512Init
|
#define SHA512_Init SHA512Init
|
||||||
#define SHA512_Update SHA512Update
|
#define SHA512_Update SHA512Update
|
||||||
#define SHA512_Final SHA512Final
|
#define SHA512_Final SHA512Final
|
||||||
|
#else
|
||||||
|
#include "openssl/sha.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sys/vfs.h>
|
#include <sys/vfs.h>
|
||||||
#include <sys/statfs.h>
|
#include <sys/statfs.h>
|
||||||
|
|
@ -64,7 +71,9 @@
|
||||||
|
|
||||||
int getentropy(void *buf, size_t len);
|
int getentropy(void *buf, size_t len);
|
||||||
|
|
||||||
|
#ifdef CAN_REFERENCE_MAIN
|
||||||
extern int main(int, char *argv[]);
|
extern int main(int, char *argv[]);
|
||||||
|
#endif
|
||||||
static int gotdata(char *buf, size_t len);
|
static int gotdata(char *buf, size_t len);
|
||||||
static int getentropy_urandom(void *buf, size_t len, const char *path,
|
static int getentropy_urandom(void *buf, size_t len, const char *path,
|
||||||
int devfscheck);
|
int devfscheck);
|
||||||
|
|
@ -297,7 +306,9 @@ getentropy_fallback(void *buf, size_t len)
|
||||||
HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1,
|
HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1,
|
||||||
sigset);
|
sigset);
|
||||||
|
|
||||||
|
#ifdef CAN_REFERENCE_MAIN
|
||||||
HF(main); /* an addr in program */
|
HF(main); /* an addr in program */
|
||||||
|
#endif
|
||||||
HF(getentropy); /* an addr in this library */
|
HF(getentropy); /* an addr in this library */
|
||||||
HF(printf); /* an addr in libc */
|
HF(printf); /* an addr in libc */
|
||||||
p = (char *)&p;
|
p = (char *)&p;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
- Downgrade compat/getentropy_solaris.c to version 1.4 from OpenBSD.
|
- Downgrade compat/getentropy_solaris.c to version 1.4 from OpenBSD.
|
||||||
The dl_iterate_phdr() function introduced in newer versions raises
|
The dl_iterate_phdr() function introduced in newer versions raises
|
||||||
compilation errors on solaris 10.
|
compilation errors on solaris 10.
|
||||||
|
- Changes to compat/getentropy_solaris.c for,
|
||||||
|
ifdef stdint.h inclusion for older systems.
|
||||||
|
ifdef sha2.h inclusion for older systems.
|
||||||
|
|
||||||
6 January 2020: Wouter
|
6 January 2020: Wouter
|
||||||
- Merge #135 from Florian Obser: Use passed in neg and key cache
|
- Merge #135 from Florian Obser: Use passed in neg and key cache
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue