From a120e66148bb2e05230e33a348e7160b8a25e8d2 Mon Sep 17 00:00:00 2001 From: Richard Aas Date: Mon, 24 Nov 2014 05:33:48 +0000 Subject: [PATCH] openbsd fixes --- mk/re.mk | 2 ++ src/sys/rand.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mk/re.mk b/mk/re.mk index 3e8e5f5..e00ebbb 100644 --- a/mk/re.mk +++ b/mk/re.mk @@ -503,7 +503,9 @@ HAVE_EPOLL := $(shell [ -f $(SYSROOT)/include/sys/epoll.h ] || \ [ -f $(SYSROOT)/include/$(MACHINE)/sys/epoll.h ] \ && echo "1") endif +ifneq ($(OS),openbsd) HAVE_LIBRESOLV := $(shell [ -f $(SYSROOT)/include/resolv.h ] && echo "1") +endif ifneq ($(HAVE_LIBRESOLV),) CFLAGS += -DHAVE_LIBRESOLV diff --git a/src/sys/rand.c b/src/sys/rand.c index 32e7aad..10df813 100644 --- a/src/sys/rand.c +++ b/src/sys/rand.c @@ -43,7 +43,9 @@ static bool inited = false; */ void rand_init(void) { +#ifndef USE_OPENSSL srand((uint32_t) tmr_jiffies()); +#endif #if RAND_DEBUG inited = true;