./../include/sha.h:314:12: error: conflicting types for 'hmac'; have 'int(SHAversion, const unsigned char *, size_t, const unsigned char *, size_t, uint8_t *)' {aka 'int(SHAversion, const unsigned char *, long unsigned int, const unsigned char *, long unsigned int, unsigned char *)'}
314 | extern int hmac (SHAversion whichSha, /* which SHA algorithm to use */
| ^~~~
In file included from login.c:41:
/usr/include/stdlib.h:309:10: note: previous declaration of 'hmac' with type 'ssize_t(const char *, const void *, size_t, const void *, size_t, void *, size_t)' {aka 'long int(const char *, const void *, long unsigned int, const void *, long unsigned int, void *, long unsigned int)'}
309 | ssize_t hmac(const char *, const void *, size_t, const void *, size_t, void *,
| ^~~~
--- include/sha.h.orig 2026-08-07 07:44:14.462361966 +0000
+++ include/sha.h
@@ -305,6 +305,7 @@ extern int USHAHashSizeBits (enum SHAversion whichSha)
extern int USHAHashSize (enum SHAversion whichSha);
extern int USHAHashSizeBits (enum SHAversion whichSha);
+#if 0
/*
* HMAC Keyed-Hashing for Message Authentication, RFC2104,
* for all SHAs.
@@ -330,5 +331,6 @@ extern int hmacResult (HMACContext * ctx, uint8_t *dig
extern int hmacFinalBits (HMACContext * ctx, const uint8_t bits,
size_t bitcount);
extern int hmacResult (HMACContext * ctx, uint8_t *digest);
+#endif
#endif /* _SHA_H_ */
Building 1.20.3 on NetBSD gives error:
From what I can see, hmac definition are not used and can be removed, solving the problem: