memtest86_/memtest86+-5.01-array-size-fix.patch
Dirk Mueller a7827ead44 Accepting request 243156 from home:coolo:branches:openSUSE:Factory
- make it work by picking patches from Fedora - memtest doesn't like
  optimizations with newer compilers.
  See https://bugs.mageia.org/show_bug.cgi?id=11661 and fedora bugs.
- Added patches (all from fedora pkg):
   memtest86+-5.01-array-size-fix.patch
   memtest86+-5.01-compile-fix.patch
   memtest86+-5.01-no-optimization.patch

OBS-URL: https://build.opensuse.org/request/show/243156
OBS-URL: https://build.opensuse.org/package/show/Base:System/memtest86+?expand=0&rev=22
2014-07-31 15:39:20 +00:00

21 lines
867 B
Diff

--- memtest86+-5.01/controller.c~ 2013-08-10 02:01:58.000000000 +0000
+++ memtest86+-5.01/controller.c 2013-12-12 20:58:12.873555378 +0000
@@ -292,7 +292,7 @@
/* First, locate the PCI bus where the MCH is located */
- for(i = 0; i < sizeof(possible_nhm_bus); i++) {
+ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
vid &= 0xFFFF;
@@ -327,7 +327,7 @@
ctrl.mode = ECC_NONE;
/* First, locate the PCI bus where the MCH is located */
- for(i = 0; i < sizeof(possible_nhm_bus); i++) {
+ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
vid &= 0xFFFF;