Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pam_radius powerpc build issue #1

Closed
arr2036 opened this issue Oct 26, 2012 · 2 comments
Closed

pam_radius powerpc build issue #1

arr2036 opened this issue Oct 26, 2012 · 2 comments

Comments

@arr2036
Copy link
Member

arr2036 commented Oct 26, 2012

(Originally by @TomasFuego, moved to pam_radius repo)

The pam_radius/md5.c needs to account for other big endian processors like powerpc.

This patch works for me using gcc 4.6.3:

Index: md5.c
--- md5.c (revision 210)
+++ md5.c (working copy)
@@ -42,7 +42,7 @@

include

include "md5.h"

-#if defined(__sparc) || defined(__mips)
+#if __BYTE_ORDER == __BIG_ENDIAN

define HIGHFIRST

endif

@alandekok
Copy link
Member

Arran Cudbard-Bell wrote:

-#if defined(__sparc) || defined(__mips)
+#if __BYTE_ORDER == __BIG_ENDIAN

Breaking existing code isn't an option.

A better solution would be:

#ifdef __BYTE_ORDER
... use it
#else
... existing code ..
#endif

@rm-recurseforce-root
Copy link

That would be fine. I'm not sure when __BYTE_ORDER was introduced to gcc, though I'm pretty sure I've used this check with gcc33. But, it may not be present if other compilers if you support things other than gcc.

Will you be the one to commit the change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants