Mercurial > dropbear
changeset 1798:8dc43b30c6bf
Define _GNU_SOURCE properly, other header fixes
This lets -std=c89 build for gcc 8.4.0
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 04 Mar 2021 21:03:02 +0800 |
parents | f680a19bd559 |
children | 8df3d6aa5f23 |
files | cli-authpubkey.c configure.ac dbmalloc.h fuzz.h includes.h svr-auth.c |
diffstat | 6 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/cli-authpubkey.c Thu Mar 04 21:02:16 2021 +0800 +++ b/cli-authpubkey.c Thu Mar 04 21:03:02 2021 +0800 @@ -125,7 +125,7 @@ static void cli_buf_put_sign(buffer* buf, sign_key *key, enum signature_type sigtype, const buffer *data_buf) { #if DROPBEAR_CLI_AGENTFWD - // TODO: rsa-sha256 agent + /* TODO: rsa-sha256 agent */ if (key->source == SIGNKEY_SOURCE_AGENT) { /* Format the agent signature ourselves, as buf_put_sign would. */ buffer *sigblob;
--- a/configure.ac Thu Mar 04 21:02:16 2021 +0800 +++ b/configure.ac Thu Mar 04 21:03:02 2021 +0800 @@ -47,6 +47,9 @@ AC_MSG_NOTICE([Checking if compiler '$CC' supports -fno-strict-overflow]) DB_TRYADDCFLAGS([-fno-strict-overflow]) +# needed for various extensions. define early before autoconf tests +AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions if glibc]) + STATIC=0 AC_ARG_ENABLE(static, [ --enable-static Build static binaries],
--- a/dbmalloc.h Thu Mar 04 21:02:16 2021 +0800 +++ b/dbmalloc.h Thu Mar 04 21:03:02 2021 +0800 @@ -1,9 +1,9 @@ #ifndef DBMALLOC_H_ #define DBMALLOC_H_ -#include "stdint.h" -#include "stdlib.h" #include "options.h" +#include <stdint.h> +#include <stdlib.h> void * m_malloc(size_t size); void * m_calloc(size_t nmemb, size_t size);
--- a/fuzz.h Thu Mar 04 21:02:16 2021 +0800 +++ b/fuzz.h Thu Mar 04 21:03:02 2021 +0800 @@ -80,7 +80,7 @@ int do_jmp; sigjmp_buf jmp; - // write out decrypted session data to this FD if it's set + // write out decrypted session data to this FD if it is set // flag - this needs to be set manually in cli-main.c etc int dumping; // the file descriptor @@ -114,6 +114,6 @@ #define getpwuid(x) fuzz_getpwuid(x) #endif // FUZZ_NO_REPLACE_GETPW -#endif // DROPBEAR_FUZZ +#endif /* DROPBEAR_FUZZ */ #endif /* DROPBEAR_FUZZ_H */