build-amd64-20181013.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Description: Fix build as of 2018-10-13
  2. Fix build errors, possibly introduced with GCC 8.
  3. Author: Javier Serrano Polo <javier@jasp.net>
  4. Bug-Debian: https://bugs.debian.org/897806
  5. Index: lmms-1.1.3/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h
  6. ===================================================================
  7. --- lmms-1.1.3.orig/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h
  8. +++ lmms-1.1.3/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h
  9. @@ -40,9 +40,11 @@ class FPTruncateMode
  10. FPTruncateMode()
  11. {
  12. +#ifdef __i386__
  13. fstcw (cw0);
  14. cw1 = cw0 | 0xC00;
  15. fldcw (cw1);
  16. +#endif
  17. }
  18. ~FPTruncateMode()
  19. Index: lmms-1.1.3/plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp
  20. ===================================================================
  21. --- lmms-1.1.3.orig/plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp
  22. +++ lmms-1.1.3/plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp
  23. @@ -33,7 +33,8 @@
  24. //operations on FFTfreqs
  25. inline void clearAll(fft_t *freqs)
  26. {
  27. - memset(freqs, 0, synth->oscilsize / 2 * sizeof(fft_t));
  28. + for(int i = 0; i < synth->oscilsize / 2; ++i)
  29. + freqs[i] = fft_t(0.0f, 0.0f);
  30. }
  31. inline void clearDC(fft_t *freqs)
  32. @@ -928,8 +929,8 @@ void OscilGen::getspectrum(int n, float
  33. if(what == 0) {
  34. for(int i = 0; i < n; ++i)
  35. outoscilFFTfreqs[i] = fft_t(spc[i], spc[i]);
  36. - memset(outoscilFFTfreqs + n, 0,
  37. - (synth->oscilsize / 2 - n) * sizeof(fft_t));
  38. + for(int i = n; i < synth->oscilsize / 2; ++i)
  39. + outoscilFFTfreqs[i] = fft_t(0.0f, 0.0f);
  40. adaptiveharmonic(outoscilFFTfreqs, 0.0f);
  41. adaptiveharmonicpostprocess(outoscilFFTfreqs, n - 1);
  42. for(int i = 0; i < n; ++i)