mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Keep openSSH-portable's blowfish code unmodified
and use a stub "includes.h". This also fixes build issues against musl-libc, which does not implicitly include <sys/types.h>
This commit is contained in:
parent
3353b329fc
commit
123701080d
@ -34,17 +34,7 @@
|
|||||||
#ifndef _BLF_H_
|
#ifndef _BLF_H_
|
||||||
#define _BLF_H_
|
#define _BLF_H_
|
||||||
|
|
||||||
#ifdef _WIN32
|
#include "includes.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
#if !defined(HAVE_BCRYPT_PBKDF) && !defined(HAVE_BLH_H)
|
#if !defined(HAVE_BCRYPT_PBKDF) && !defined(HAVE_BLH_H)
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
* Bruce Schneier.
|
* Bruce Schneier.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define HAVE_BLF_H
|
#include "includes.h"
|
||||||
|
|
||||||
#if !defined(HAVE_BCRYPT_PBKDF) && (!defined(HAVE_BLOWFISH_INITSTATE) || \
|
#if !defined(HAVE_BCRYPT_PBKDF) && (!defined(HAVE_BLOWFISH_INITSTATE) || \
|
||||||
!defined(HAVE_BLOWFISH_EXPAND0STATE) || !defined(HAVE_BLF_ENC))
|
!defined(HAVE_BLOWFISH_EXPAND0STATE) || !defined(HAVE_BLF_ENC))
|
||||||
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifdef HAVE_BLF_H
|
#ifdef HAVE_BLF_H
|
||||||
#include "blf.h"
|
#include <blf.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef inline
|
#undef inline
|
||||||
|
20
src/sshagent/includes.h
Normal file
20
src/sshagent/includes.h
Normal file
@ -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 <sys/types.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
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
|
Loading…
Reference in New Issue
Block a user