aboutsummaryrefslogtreecommitdiff
path: root/stand/libsa
diff options
context:
space:
mode:
Diffstat (limited to 'stand/libsa')
-rw-r--r--stand/libsa/Makefile4
-rw-r--r--stand/libsa/smbios.c11
2 files changed, 9 insertions, 6 deletions
diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile
index f5a1acea843e..470c03032f61 100644
--- a/stand/libsa/Makefile
+++ b/stand/libsa/Makefile
@@ -189,9 +189,9 @@ SRCS+= g_eli_hmac.c pkcs5v2.c
.PATH: ${SYSDIR}/crypto/sha2
SRCS+= sha256c.c sha512c.c
-# md5 from the kernel
-.PATH: ${SYSDIR}/kern
+.PATH: ${SYSDIR}/crypto
SRCS+= md5c.c
+CFLAGS.md5c.c+= -DSTANDALONE_SMALL
.if ${DO32:U0} == 0
MAN=libsa.3
diff --git a/stand/libsa/smbios.c b/stand/libsa/smbios.c
index 32cd198a9537..73b49a111f89 100644
--- a/stand/libsa/smbios.c
+++ b/stand/libsa/smbios.c
@@ -186,14 +186,17 @@ smbios_sigsearch(const caddr_t addr, const uint32_t len)
*/
SMBIOS_GET8(cp, 0x0a) != 0 &&
smbios_checksum(cp, SMBIOS_GET8(cp, 0x06)) == 0) {
-#ifdef __ILP32__
+#if __SIZEOF_SIZE_T__ < 8
uint64_t end_addr;
end_addr = SMBIOS_GET64(cp, 0x10) + /* Start address. */
SMBIOS_GET32(cp, 0x0c); /* Maximum size. */
- /* Is the table (or part of it) located above 4G? */
- if (end_addr >= (uint64_t)1 << 32)
- /* Can't access it with 32-bit addressing. */
+ /*
+ * Is the table (or part of it) located above what we
+ * can address?
+ */
+ if ((size_t)end_addr != end_addr)
+ /* Yes, give it up. */
continue;
#endif
smbios.is_64bit_ep = 1;