]> git.pld-linux.org Git - packages/autofs.git/blobdiff - autofs-5.0.4-srv-lookup-handle-endian.patch
- import latest patchset.
[packages/autofs.git] / autofs-5.0.4-srv-lookup-handle-endian.patch
diff --git a/autofs-5.0.4-srv-lookup-handle-endian.patch b/autofs-5.0.4-srv-lookup-handle-endian.patch
new file mode 100644 (file)
index 0000000..093ecc8
--- /dev/null
@@ -0,0 +1,37 @@
+autofs-5.0.4 - srv lookup handle endianness
+
+From: Ian Kent <raven@themaw.net>
+
+
+---
+
+ modules/dclist.c |    6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+
+diff --git a/modules/dclist.c b/modules/dclist.c
+index 5b0e577..967581c 100644
+--- a/modules/dclist.c
++++ b/modules/dclist.c
+@@ -34,6 +34,7 @@
+ #include <ldap.h>
+ #include <sys/param.h>
+ #include <errno.h>
++#include <endian.h>
+ #include "automount.h"
+ #include "dclist.h"
+@@ -72,8 +73,13 @@
+ #define SVAL(buf, pos) (*(const uint16_t *)((const char *)(buf) + (pos)))
+ #define IVAL(buf, pos) (*(const uint32_t *)((const char *)(buf) + (pos)))
++#if __BYTE_ORDER == __LITTLE_ENDIAN
+ #define SREV(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF))
+ #define IREV(x) ((SREV(x)<<16) | (SREV((x)>>16)))
++#else
++#define SREV(x) (x)
++#define IREV(x) (x)
++#endif
+ #define RSVAL(buf, pos) SREV(SVAL(buf, pos))
+ #define RIVAL(buf, pos) IREV(IVAL(buf, pos))
This page took 0.047034 seconds and 4 git commands to generate.