mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-29 10:39:22 +00:00
Fix FreeBSD compilation.
* grub-core/disk/geli.c (GRUB_MD_SHA256) [GRUB_UTIL]: Redefine in a way to avoid circular dependency. (GRUB_MD_SHA512) [GRUB_UTIL]: Likewise. * util/getroot.c (grub_util_follow_gpart_up): Move from here... * grub-core/kern/emu/hostdisk.c (+grub_util_follow_gpart_up): ... here.
This commit is contained in:
1 parent
4a19b6017d
commit
27610c3836
4 files changed
+95
-50
No files matched your search
@@ -58,6 +58,38 @@
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
/* Dirty trick to solve circular dependency. */
|
||||
#ifdef GRUB_UTIL
|
||||
|
||||
#include <grub/util/misc.h>
|
||||
|
||||
#undef GRUB_MD_SHA256
|
||||
#undef GRUB_MD_SHA512
|
||||
|
||||
static const gcry_md_spec_t *
|
||||
grub_md_sha256_real (void)
|
||||
{
|
||||
const gcry_md_spec_t *ret;
|
||||
ret = grub_crypto_lookup_md_by_name ("sha256");
|
||||
if (!ret)
|
||||
grub_util_error ("Coulnd't load sha256");
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const gcry_md_spec_t *
|
||||
grub_md_sha512_real (void)
|
||||
{
|
||||
const gcry_md_spec_t *ret;
|
||||
ret = grub_crypto_lookup_md_by_name ("sha512");
|
||||
if (!ret)
|
||||
grub_util_error ("Coulnd't load sha512");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define GRUB_MD_SHA256 grub_md_sha256_real()
|
||||
#define GRUB_MD_SHA512 grub_md_sha512_real()
|
||||
#endif
|
||||
|
||||
struct grub_geli_key
|
||||
{
|
||||
grub_uint8_t iv_key[64];
|
||||
|
||||
Reference in new issue
Block a user