]> TLD Linux GIT Repositories - packages/sheepdog.git/commitdiff
- fix i686 build master
authorMarcin Krol <hawk@tld-linux.org>
Wed, 8 Jul 2015 14:26:13 +0000 (14:26 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Wed, 8 Jul 2015 14:26:13 +0000 (14:26 +0000)
sheepdog-x86-fixes.patch [new file with mode: 0644]
sheepdog.spec

diff --git a/sheepdog-x86-fixes.patch b/sheepdog-x86-fixes.patch
new file mode 100644 (file)
index 0000000..0ee07f6
--- /dev/null
@@ -0,0 +1,80 @@
+diff -urNp sheepdog-sheepdog-d659b9b.orig/include/fec.h sheepdog-sheepdog-d659b9b/include/fec.h
+--- sheepdog-sheepdog-d659b9b.orig/include/fec.h       2015-06-07 07:55:29.000000000 +0000
++++ sheepdog-sheepdog-d659b9b/include/fec.h    2015-07-08 14:21:04.501517808 +0000
+@@ -100,8 +100,10 @@ void fec_decode_buffer(struct fec *ctx,
+ /* for isa-l */
++#ifdef __x86_64__
+ void isa_decode_buffer(struct fec *ctx, uint8_t *input[], const int in_idx[],
+                      char *buf, int idx);
++#endif
+ /*
+  * @param inpkts an array of packets (size k); If a primary block, i, is present
+@@ -177,10 +179,12 @@ static inline void ec_encode(struct fec
+       for (int i = 0; i < p; i++)
+               pidx[i] = ctx->d + i;
++#ifdef __x86_64__
+       if (cpu_has_ssse3)
+               ec_encode_data_sse(SD_EC_DATA_STRIPE_SIZE / ctx->d, ctx->d, p,
+                                  ctx->ec_tbl, (unsigned char **)ds, ps);
+       else
++#endif
+               fec_encode(ctx, ds, ps, pidx, p, SD_EC_DATA_STRIPE_SIZE /
+                          ctx->d);
+ }
+@@ -207,9 +211,11 @@ static inline void ec_destroy(struct fec
+ static inline void ec_decode_buffer(struct fec *ctx, uint8_t *input[],
+                                   const int in_idx[], char *buf, int idx)
+ {
++#ifdef __x86_64__
+       if (cpu_has_ssse3)
+               isa_decode_buffer(ctx, input, in_idx, buf, idx);
+       else
++#endif
+               fec_decode_buffer(ctx, input, in_idx, buf, idx);
+ }
+ #endif
+diff -urNp sheepdog-sheepdog-d659b9b.orig/lib/fec.c sheepdog-sheepdog-d659b9b/lib/fec.c
+--- sheepdog-sheepdog-d659b9b.orig/lib/fec.c   2015-06-07 07:55:29.000000000 +0000
++++ sheepdog-sheepdog-d659b9b/lib/fec.c        2015-07-08 14:20:53.744517808 +0000
+@@ -454,8 +454,10 @@ void fec_free(struct fec *p)
+       assert(p != NULL && p->magic == (((FEC_MAGIC ^ p->d) ^ p->dp) ^
+                                        (unsigned long) (p->enc_matrix)));
+       free(p->enc_matrix);
++#ifdef __x86_64__
+       if (cpu_has_ssse3)
+               free(p->ec_tbl);
++#endif
+       free(p);
+ }
+@@ -496,11 +498,13 @@ struct fec *fec_new(unsigned short d, un
+               *p = 1;
+       free(tmp_m);
++#ifdef __x86_64__
+       if (cpu_has_ssse3) {
+               retval->ec_tbl = xmalloc(dp * d * 32);
+               ec_init_tables(d, dp - d, retval->enc_matrix + (d * d),
+                              retval->ec_tbl);
+       } else
++#endif
+               retval->ec_tbl = NULL;
+       return retval;
+ }
+@@ -712,6 +716,7 @@ void fec_decode_buffer(struct fec *ctx,
+       }
+ }
++#ifdef __x86_64__
+ void isa_decode_buffer(struct fec *ctx, uint8_t *input[], const int in_idx[],
+                      char *buf, int idx)
+ {
+@@ -739,3 +744,4 @@ void isa_decode_buffer(struct fec *ctx,
+       ec_init_tables(ed, 1, cm, ec_tbl);
+       ec_encode_data_sse(len, ed, 1, ec_tbl, input, lost);
+ }
++#endif
index ae00d85cbd71543b7b7aa9eeba424512eb1b4ef9..140f9ba9e18a32f4cac49239fbb56d84f58a16f3 100644 (file)
@@ -7,11 +7,12 @@ Summary:      Sheepdog - distributed storage system for QEMU/KVM
 Summary(pl.UTF-8):     Sheepdog - rozproszony system przechowywania danych dla QEMU/KVM
 Name:          sheepdog
 Version:       0.9.2
-Release:       1
+Release:       2
 License:       GPL v2
 Group:         Applications/System
 Source0:       https://github.com/collie/sheepdog/tarball/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5: f00856d60425202cb9d3c1c834d7d9ec
+Patch0:                %{name}-x86-fixes.patch
 URL:           http://www.osrg.net/sheepdog/
 BuildRequires: autoconf >= 2.61
 BuildRequires: automake
@@ -55,6 +56,7 @@ Bashowe dopeÅ‚nianie skÅ‚adni dla polecenia dog z pakietu sheepdog.
 
 %prep
 %setup -q -n sheepdog-sheepdog-d659b9b
+%patch0 -p1
 
 %build
 %{__aclocal}