urngd: fix build for glibc

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2023-09-01 09:38:23 +08:00
parent 0c5aa06824
commit caf6177269
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 7 additions and 3 deletions

View File

@ -38,6 +38,11 @@ define Package/urngd/description
Jitter RNGd provides a source of sufficient entropy.
endef
ifdef CONFIG_USE_GLIBC
TARGET_CFLAGS += -U_FORTIFY_SOURCE
TARGET_LDFLAGS += -lpthread
endif
define Package/urngd/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)

View File

@ -1,8 +1,6 @@
diff --git a/urngd.c b/urngd.c
index 35ccdec..410d300 100644
--- a/urngd.c
+++ b/urngd.c
@@ -129,9 +129,14 @@ static size_t gather_entropy(struct urngd *u)
@@ -129,9 +129,14 @@ static size_t gather_entropy(struct urng
static void low_entropy_cb(struct uloop_fd *ufd, unsigned int events)
{
struct urngd *u = container_of(ufd, struct urngd, rnd_fd);
@ -17,3 +15,4 @@ index 35ccdec..410d300 100644
+ }
}
static void urngd_done(struct urngd *u)