mirror of
https://github.com/clearml/dropbear
synced 2025-06-13 17:58:19 +00:00
Define _GNU_SOURCE properly, other header fixes
This lets -std=c89 build for gcc 8.4.0
This commit is contained in:
parent
8b0fdf8010
commit
03481aba06
@ -125,7 +125,7 @@ void recv_msg_userauth_pk_ok() {
|
|||||||
static void cli_buf_put_sign(buffer* buf, sign_key *key, enum signature_type sigtype,
|
static void cli_buf_put_sign(buffer* buf, sign_key *key, enum signature_type sigtype,
|
||||||
const buffer *data_buf) {
|
const buffer *data_buf) {
|
||||||
#if DROPBEAR_CLI_AGENTFWD
|
#if DROPBEAR_CLI_AGENTFWD
|
||||||
// TODO: rsa-sha256 agent
|
/* TODO: rsa-sha256 agent */
|
||||||
if (key->source == SIGNKEY_SOURCE_AGENT) {
|
if (key->source == SIGNKEY_SOURCE_AGENT) {
|
||||||
/* Format the agent signature ourselves, as buf_put_sign would. */
|
/* Format the agent signature ourselves, as buf_put_sign would. */
|
||||||
buffer *sigblob;
|
buffer *sigblob;
|
||||||
|
@ -47,6 +47,9 @@ DB_TRYADDCFLAGS([-Wno-pointer-sign])
|
|||||||
AC_MSG_NOTICE([Checking if compiler '$CC' supports -fno-strict-overflow])
|
AC_MSG_NOTICE([Checking if compiler '$CC' supports -fno-strict-overflow])
|
||||||
DB_TRYADDCFLAGS([-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
|
STATIC=0
|
||||||
AC_ARG_ENABLE(static,
|
AC_ARG_ENABLE(static,
|
||||||
[ --enable-static Build static binaries],
|
[ --enable-static Build static binaries],
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef DBMALLOC_H_
|
#ifndef DBMALLOC_H_
|
||||||
#define DBMALLOC_H_
|
#define DBMALLOC_H_
|
||||||
|
|
||||||
#include "stdint.h"
|
|
||||||
#include "stdlib.h"
|
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
void * m_malloc(size_t size);
|
void * m_malloc(size_t size);
|
||||||
void * m_calloc(size_t nmemb, size_t size);
|
void * m_calloc(size_t nmemb, size_t size);
|
||||||
|
4
fuzz.h
4
fuzz.h
@ -80,7 +80,7 @@ struct dropbear_fuzz_options {
|
|||||||
int do_jmp;
|
int do_jmp;
|
||||||
sigjmp_buf 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
|
// flag - this needs to be set manually in cli-main.c etc
|
||||||
int dumping;
|
int dumping;
|
||||||
// the file descriptor
|
// the file descriptor
|
||||||
@ -114,6 +114,6 @@ struct passwd* fuzz_getpwnam(const char *login);
|
|||||||
#define getpwuid(x) fuzz_getpwuid(x)
|
#define getpwuid(x) fuzz_getpwuid(x)
|
||||||
#endif // FUZZ_NO_REPLACE_GETPW
|
#endif // FUZZ_NO_REPLACE_GETPW
|
||||||
|
|
||||||
#endif // DROPBEAR_FUZZ
|
#endif /* DROPBEAR_FUZZ */
|
||||||
|
|
||||||
#endif /* DROPBEAR_FUZZ_H */
|
#endif /* DROPBEAR_FUZZ_H */
|
||||||
|
@ -25,9 +25,6 @@
|
|||||||
#ifndef DROPBEAR_INCLUDES_H_
|
#ifndef DROPBEAR_INCLUDES_H_
|
||||||
#define DROPBEAR_INCLUDES_H_
|
#define DROPBEAR_INCLUDES_H_
|
||||||
|
|
||||||
/* uclibc needs _GNU_SOURCE, maybe other things? */
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
|
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
/* This file (auth.c) handles authentication requests, passing it to the
|
/* This file (auth.c) handles authentication requests, passing it to the
|
||||||
* particular type (auth-passwd, auth-pubkey). */
|
* particular type (auth-passwd, auth-pubkey). */
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "dbutil.h"
|
#include "dbutil.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user