Re: [MacPorts] #58060: Build error on Ubuntu: unknown type name ‘SHA2_CTX’ / conflicting types for ‘SHA256_CTX’
MacPorts
noreply at macports.org
Thu Feb 14 11:40:35 UTC 2019
#58060: Build error on Ubuntu: unknown type name ‘SHA2_CTX’ / conflicting types for
‘SHA256_CTX’
---------------------+--------------------
Reporter: mojca | Owner: (none)
Type: defect | Status: new
Priority: Low | Milestone:
Component: base | Version:
Resolution: | Keywords:
Port: |
---------------------+--------------------
Comment (by mojca):
If I look at (first search hit)
https://github.com/aosm/libmd/blob/master/sha256.h, I see
{{{
#!c
#ifdef __APPLE__
#define COMMON_DIGEST_FOR_OPENSSL
#include <CommonCrypto/CommonDigest.h>
#else /* !__APPLE__ */
typedef struct SHA256Context {
uint32_t state[8];
uint32_t count[2];
unsigned char buf[64];
} SHA256_CTX;
#endif /* __APPLE__ */
}}}
The file `sha256cmd.c` contains neither `sha256.h` nor the `else` part.
Including that header results in
{{{
In file included from /usr/include/sha256.h:32:0,
from sha256cmd.c:44:
./sha2.h:49:2: error: unknown type name ‘u_int32_t’
u_int32_t state[8];
^~~~~~~~~
}}}
--
Ticket URL: <https://trac.macports.org/ticket/58060#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list