From 6b2def45ea0e5e1f999a06a6b2bd175662024abc Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 18 Dec 2015 11:55:53 +0100 Subject: dco + do not require gcc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/cerberus.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/cerberus.c') diff --git a/src/cerberus.c b/src/cerberus.c index a5304a7..c22690e 100644 --- a/src/cerberus.c +++ b/src/cerberus.c @@ -460,6 +460,9 @@ void do_login(int argc, char** argv) #if AUTH > 0 +/** + * Called before the process exits, to do cleanup + */ void preexit(void) { if (skip_auth == 0) @@ -492,7 +495,9 @@ char* read_passphrase(void) #endif +#ifdef __GNUC__ # pragma GCC optimize "-O0" +#endif /** @@ -512,7 +517,10 @@ void destroy_passphrase(void) /** * Wipe the passphrase when the program exits */ -static __attribute__((destructor)) void passphrase_destructor(void) +#ifdef __GNUC__ +__attribute__((destructor)) +#endif +static void passphrase_destructor(void) { destroy_passphrase(); } -- cgit v1.2.3-70-g09d2