From 7bb2e241a0f39a2e42dee6dc3ec3773d42aabb92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 18 Aug 2020 21:15:52 +0200 Subject: lib/crypt-port.h: Include without declaring crypt prototypes. The prototypes of the crypt{,_r}() function and struct crypt_data possibly defined in need to be renamed as they might be incompatible with our declarations. We achieve this by defining macros *BEFORE* including at the top of and undefining them directly afterwards. Defining these macros *AFTER* , which also defines the same macros for symbol-versioning purposes, was included, would lead to a clashing redefinition of this macro, and thus cause our internal symbol-versioning would not work properly anymore. Also drop any direct inclusion of in several source files. Fixes #110. --- test/badsalt.c | 1 - test/crypt-badargs.c | 1 - test/getrandom-fallbacks.c | 3 --- test/getrandom-interface.c | 1 - 4 files changed, 6 deletions(-) (limited to 'test') diff --git a/test/badsalt.c b/test/badsalt.c index 803b575..2e28623 100644 --- a/test/badsalt.c +++ b/test/badsalt.c @@ -22,7 +22,6 @@ #include #include #include -#include static const char phrase[] = "values of β will give rise to dom!"; diff --git a/test/crypt-badargs.c b/test/crypt-badargs.c index 59c6690..ae69032 100644 --- a/test/crypt-badargs.c +++ b/test/crypt-badargs.c @@ -15,7 +15,6 @@ #include #include #include -#include /* The behavior tested below should be consistent for all hashing methods. */ diff --git a/test/getrandom-fallbacks.c b/test/getrandom-fallbacks.c index 9f93cba..8469a2e 100644 --- a/test/getrandom-fallbacks.c +++ b/test/getrandom-fallbacks.c @@ -23,9 +23,6 @@ #ifdef HAVE_SYS_STAT_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif /* If arc4random_buf is available, all of the fallback logic is compiled out and this test is unnecessary. If ld --wrap is not available this diff --git a/test/getrandom-interface.c b/test/getrandom-interface.c index 82be78a..e033687 100644 --- a/test/getrandom-interface.c +++ b/test/getrandom-interface.c @@ -15,7 +15,6 @@ #include #include #include -#include static bool error_occurred; -- cgit v1.2.3