SHA256
1
0
forked from pool/libmemcached
libmemcached/libmemcached-bigendian.patch
Ismail Dönmez 2241f786d2 Accepting request 141938 from home:k0da:ppc
- fix defined but not used variable error on bigendian machines
  (libmemcached-bigendian.patch)

OBS-URL: https://build.opensuse.org/request/show/141938
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libmemcached?expand=0&rev=31
2012-11-19 16:38:36 +00:00

22 lines
774 B
Diff

Index: libmemcached-1.0.11/libhashkit/jenkins.cc
===================================================================
--- libmemcached-1.0.11.orig/libhashkit/jenkins.cc
+++ libmemcached-1.0.11/libhashkit/jenkins.cc
@@ -59,12 +59,13 @@ In which case, the hash table should hav
uint32_t hashkit_jenkins(const char *key, size_t length, void *)
{
uint32_t a,b,c; /* internal state */
- union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
-
+#ifndef WORDS_BIGENDIAN
+ union { const void *ptr; size_t i; } u;
+ u.ptr = key;
+#endif
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + JENKINS_INITVAL;
- u.ptr = key;
#ifndef WORDS_BIGENDIAN
if ((u.i & 0x3) == 0)
{