Skip to content

Detect more big-endian platforms natively#2031

Merged
vikman90 merged 1 commit into3.8from
3.8-fix-endianness
Dec 7, 2018
Merged

Detect more big-endian platforms natively#2031
vikman90 merged 1 commit into3.8from
3.8-fix-endianness

Conversation

@vikman90
Copy link
Member

@vikman90 vikman90 commented Dec 4, 2018

This PR allows compiling Wazuh on the platforms below with needing to explicitly declare OS_BIG_ENDIAN in the make call.

  • Solaris 10 on SPARC: __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
  • Solaris 11 on SPARC: defined(__sparc__)
  • HP-UX: defined(__BIG_ENDIAN__)

On the other hand, this change also limits the byte swapping to little-endian platforms when communicating with the cluster.

@vikman90 vikman90 added type/bug Something isn't working module/agent Issues related to the agent daemon labels Dec 4, 2018
@vikman90 vikman90 added this to the 49th week sprint milestone Dec 4, 2018
@vikman90 vikman90 self-assigned this Dec 4, 2018
@vikman90 vikman90 requested a review from TJOSERAFAEL December 4, 2018 12:42
@vikman90 vikman90 changed the title Detect more big-endian platform natively Detect more big-endian platforms natively Dec 4, 2018
- Solaris 10 on SPARC: `__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__`
- Solaris 11 on SPARC: `defined(__sparc__)`
- HP-UX: `defined(__BIG_ENDIAN__)`
Copy link
Contributor

@TJOSERAFAEL TJOSERAFAEL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@vikman90 vikman90 changed the base branch from master to 3.8 December 7, 2018 17:40
@vikman90 vikman90 merged commit 4534cc5 into 3.8 Dec 7, 2018
@vikman90 vikman90 deleted the 3.8-fix-endianness branch December 7, 2018 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module/agent Issues related to the agent daemon type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants