diff options
author | Damien Miller <djm@mindrot.org> | 2024-01-08 04:45:14 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2024-01-08 04:45:14 +0100 |
commit | 9ea0a4524ae3276546248a926b6641b2fbc8421b (patch) | |
tree | 33a841a884e9cb3c4c7c4b68988ce39cbb16905e /openbsd-compat/openbsd-compat.h | |
parent | upstream: remove ext-info-* in the kex.c code, not in callers; (diff) | |
download | openssh-9ea0a4524ae3276546248a926b6641b2fbc8421b.tar.xz openssh-9ea0a4524ae3276546248a926b6641b2fbc8421b.zip |
unbreak fuzzers for clang16
getopt() needs a throw() attribute to compile, so supply one when compiling
things with C++
Diffstat (limited to 'openbsd-compat/openbsd-compat.h')
-rw-r--r-- | openbsd-compat/openbsd-compat.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index 78faea962..0823d6a83 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h @@ -48,6 +48,14 @@ #include "blf.h" #include "fnmatch.h" +#ifndef __THROW +# if defined __cplusplus +# define __THROW throw() +# else +# define __THROW +# endif +#endif + #if defined(HAVE_LOGIN_CAP) && !defined(HAVE_LOGIN_GETPWCLASS) # include <login_cap.h> # define login_getpwclass(pw) login_getclass(pw->pw_class) @@ -187,7 +195,7 @@ int getgrouplist(const char *, gid_t, gid_t *, int *); #endif #if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET) -int BSDgetopt(int argc, char * const *argv, const char *opts); +int BSDgetopt(int argc, char * const *argv, const char *opts) __THROW; #include "openbsd-compat/getopt.h" #endif |