diff --git a/src/sshagent/blf.h b/src/sshagent/blf.h index 4878e558..f1ac5a5c 100644 --- a/src/sshagent/blf.h +++ b/src/sshagent/blf.h @@ -34,17 +34,7 @@ #ifndef _BLF_H_ #define _BLF_H_ -#ifdef _WIN32 - -#include - -typedef uint32_t u_int32_t; -typedef uint16_t u_int16_t; -typedef uint8_t u_int8_t; - -#define bzero(p,s) memset(p, 0, s) - -#endif +#include "includes.h" #if !defined(HAVE_BCRYPT_PBKDF) && !defined(HAVE_BLH_H) diff --git a/src/sshagent/blowfish.c b/src/sshagent/blowfish.c index 02e9ac0b..e10f7e7d 100644 --- a/src/sshagent/blowfish.c +++ b/src/sshagent/blowfish.c @@ -39,7 +39,7 @@ * Bruce Schneier. */ -#define HAVE_BLF_H +#include "includes.h" #if !defined(HAVE_BCRYPT_PBKDF) && (!defined(HAVE_BLOWFISH_INITSTATE) || \ !defined(HAVE_BLOWFISH_EXPAND0STATE) || !defined(HAVE_BLF_ENC)) @@ -51,7 +51,7 @@ #include #ifdef HAVE_BLF_H -#include "blf.h" +#include #endif #undef inline diff --git a/src/sshagent/includes.h b/src/sshagent/includes.h new file mode 100644 index 00000000..c6bb4d32 --- /dev/null +++ b/src/sshagent/includes.h @@ -0,0 +1,20 @@ +// mimic openSSH-portable's includes.h file to be able to use +// its unmodified blowfish code + +#define HAVE_BLF_H + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE /* activate extra prototypes for glibc */ +#endif +#include + + +#ifdef _WIN32 +#include + +typedef uint32_t u_int32_t; +typedef uint16_t u_int16_t; +typedef uint8_t u_int8_t; + +#define bzero(p,s) memset(p, 0, s) +#endif