From 1323f120d06a26074c4d154fcbe7f49bcad3d741 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Tue, 27 Feb 2018 08:41:25 +1100 Subject: Check for attributes on prototype args. Some compilers (gcc 2.9.53, 3.0 and probably others, see gcc bug #3481) do not accept __attribute__ on function pointer prototype args. Check for this and hide them if they're not accepted. --- sshkey.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sshkey.h') diff --git a/sshkey.h b/sshkey.h index c795815fa..155cd45ae 100644 --- a/sshkey.h +++ b/sshkey.h @@ -220,7 +220,11 @@ int sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type, int ssh_rsa_generate_additional_parameters(struct sshkey *); /* stateful keys (e.g. XMSS) */ +#ifdef NO_ATTRIBUTE_ON_PROTOTYPE_ARGS +typedef void sshkey_printfn(const char *, ...); +#else typedef void sshkey_printfn(const char *, ...) __attribute__((format(printf, 1, 2))); +#endif int sshkey_set_filename(struct sshkey *, const char *); int sshkey_enable_maxsign(struct sshkey *, u_int32_t); u_int32_t sshkey_signatures_left(const struct sshkey *); -- cgit v1.2.3