diff --git a/openbsd-compat/regress/Makefile.in b/openbsd-compat/regress/Makefile.in
index dd8cdc4b7..c446f0aa2 100644
--- a/openbsd-compat/regress/Makefile.in
+++ b/openbsd-compat/regress/Makefile.in
@@ -10,7 +10,7 @@ CFLAGS=@CFLAGS@
 CPPFLAGS=-I. -I.. -I../.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. @CPPFLAGS@ @DEFS@
 EXEEXT=@EXEEXT@
 LIBCOMPAT=../libopenbsd-compat.a
-LIBS=@LIBS@
+LIBS=@LIBS@ -lssl -lcrypto
 LDFLAGS=@LDFLAGS@ $(LIBCOMPAT)
 
 TESTPROGS=closefromtest$(EXEEXT) snprintftest$(EXEEXT) strduptest$(EXEEXT) \
