mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 03:50:57 +01:00
fixed yet another endian issue (I used the wrong define for it)
This commit is contained in:
@@ -78,7 +78,7 @@ pcp_sig_t *pcp_ed_newsig(unsigned char *hash, char *id) {
|
||||
}
|
||||
|
||||
pcp_sig_t *sig2native(pcp_sig_t *s) {
|
||||
#ifdef __BIG_ENDIAN
|
||||
#ifdef __CPU_IS_BIG_ENDIAN
|
||||
return s;
|
||||
#else
|
||||
s->version = be32toh(s->version);
|
||||
@@ -88,7 +88,7 @@ pcp_sig_t *sig2native(pcp_sig_t *s) {
|
||||
}
|
||||
|
||||
pcp_sig_t *sig2be(pcp_sig_t *s) {
|
||||
#ifdef __BIG_ENDIAN
|
||||
#ifdef __CPU_IS_BIG_ENDIAN
|
||||
return s;
|
||||
#else
|
||||
s->version = htobe32(s->version);
|
||||
|
||||
Reference in New Issue
Block a user