[PATCH v2] build: link in $(GETRANDOM_LIB) from gnulib

Mike Frysinger <[email protected]>
Newsgroups gmane.editors.nano.devel
Message-ID <[email protected]>
On Windows builds, gnulib might set GETRANDOM_LIB to -lbcrypt and then
use that API.  But since we don't include $(GETRANDOM_LIB) when linking,
we fail.  On Linux systems, this is empty as getrandom APIs are part of
the main C library already.  This is also what the link requirements say
in gnulib's modules/getrandom spec.
---
v2
- switch to GETRANDOM_LIB as LIB_GETRANDOM is apparently the old name

 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index cd019daf8489..dff550d1a973 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -43,7 +43,7 @@ nano_SOURCES = \
 		winio.c
 
 nano_LDADD = @LIBINTL@ $(top_builddir)/lib/libgnu.a \
-		$(LIB_CLOCK_GETTIME) $(LIBTHREAD)
+		$(GETRANDOM_LIB) $(LIB_CLOCK_GETTIME) $(LIBTHREAD)
 
 install-exec-hook:
 	cd $(DESTDIR)$(bindir) && rm -f rnano && $(LN_S) nano rnano
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.