diff --git a/configure.ac b/configure.ac index 8016e5ad..5b124c61 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,7 @@ case $host_os in ;; *openbsd*) bsd=true + openbsd=true AC_DEFINE(HAVE_OPENBSD, 1, [OpenBSD]) ;; *netbsd*) @@ -133,6 +134,7 @@ AC_ARG_WITH(windows2000, AM_CONDITIONAL(LINUX, test "$linux" = true) AM_CONDITIONAL(BSD, test "$bsd" = true) +AM_CONDITIONAL(OPENBSD, test "$openbsd" = true) AM_CONDITIONAL(DARWIN, test "$darwin" = true) AM_CONDITIONAL(SOLARIS, test "$solaris" = true) AM_CONDITIONAL(MINGW, test "$mingw" = true) diff --git a/src/Makefile.am b/src/Makefile.am index bcffbf29..8a73b972 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -191,10 +191,12 @@ sptps_test_LDADD = libtincd.la libed25519.la libtincconf.la libchacha_poly1305.l sptps_keypair_LDADD = libed25519.la libtincconf.la libchacha_poly1305.la libtincd.la libchacha_poly1305.la if !DARWIN +if !OPENBSD sptps_speed_LDADD += -lrt sptps_test_LDADD += -lrt sptps_keypair_LDADD += -lrt endif +endif LIBS = @LIBS@ -lm @@ -203,4 +205,8 @@ LIBS += -lpcap endif AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\" -iquote. +if OPENBSD +AM_CFLAGS += -fstack-protector-all +endif + #-fsanitize=address