From ef3853bb94c2c72e7eda0de6cec0bcb1da62058f Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 29 Nov 2019 11:52:23 +1100 Subject: [PATCH] another attempt at sk-dummy.so working x-platform include a fatal() implementation to satisfy libopenbsd-compat clean up .lo and .so files .gitignore .lo and .so files --- .gitignore | 2 ++ Makefile.in | 6 ++++-- regress/misc/sk-dummy/fatal.c | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 regress/misc/sk-dummy/fatal.c diff --git a/.gitignore b/.gitignore index 108241389..6577c0df6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ opensshd.init survey.sh **/*.0 **/*.o +**/*.lo +**/*.so **/*.out **/*.a autom4te.cache/ diff --git a/Makefile.in b/Makefile.in index d47b08345..692b00732 100644 --- a/Makefile.in +++ b/Makefile.in @@ -242,7 +242,7 @@ moduli: echo clean: regressclean - rm -f *.o *.a $(TARGETS) logintest config.cache config.log + rm -f *.o *.lo *.a $(TARGETS) logintest config.cache config.log rm -f *.out core survey rm -f regress/check-perm$(EXEEXT) rm -f regress/mkdtemp$(EXEEXT) @@ -267,6 +267,7 @@ clean: regressclean rm -f regress/misc/kexfuzz/*.o rm -f regress/misc/kexfuzz/kexfuzz$(EXEEXT) rm -f regress/misc/sk-dummy/*.o + rm -f regress/misc/sk-dummy/*.lo rm -f regress/misc/sk-dummy/sk-dummy.so (cd openbsd-compat && $(MAKE) clean) @@ -596,9 +597,10 @@ regress/misc/kexfuzz/kexfuzz$(EXEEXT): ${MISC_KEX_FUZZ_OBJS} libssh.a # These all need to be compiled -fPIC, so they are treated differently. SK_DUMMY_OBJS=\ regress/misc/sk-dummy/sk-dummy.lo \ + regress/misc/sk-dummy/fatal.lo \ ed25519.lo hash.lo ge25519.lo fe25519.lo sc25519.lo verify.lo -.c.lo: +.c.lo: Makefile.in config.h $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c $< -o $@ regress/misc/sk-dummy/sk-dummy.so: $(SK_DUMMY_OBJS) diff --git a/regress/misc/sk-dummy/fatal.c b/regress/misc/sk-dummy/fatal.c new file mode 100644 index 000000000..7cdc74b97 --- /dev/null +++ b/regress/misc/sk-dummy/fatal.c @@ -0,0 +1,20 @@ +/* public domain */ + +#include +#include +#include +#include + +void fatal(char *fmt, ...); + +void +fatal(char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); + fputc('\n', stderr); + _exit(1); +}