Browse Source

mdadm: reimplemented usleep() patch

user/karasz/next/postgresql
Alejandro Mery 15 years ago
parent
commit
255f458019
  1. 35
      base/mdadm/mdadm-2.6.7-no-susv3-legacy.patch

35
base/mdadm/mdadm-2.6.7-no-susv3-legacy.patch

@ -19,25 +19,16 @@ Description: Replace usleep() with nanosleep()
usleep() was deprecated by SUSv3 and newer LIBCs are starting to enforce that usleep() was deprecated by SUSv3 and newer LIBCs are starting to enforce that
deprecation. deprecation.
--- mdadm-2.6.7/mdopen.c.orig 2010-09-29 19:01:38.854974364 +0200 --- ./mdadm.h.orig 2010-09-25 22:49:01.040000255 +0200
+++ mdadm-2.6.7/mdopen.c 2010-09-29 19:03:34.302325754 +0200 +++ ./mdadm.h 2010-09-25 22:50:27.192000253 +0200
@@ -342,7 +342,7 @@ @@ -566,3 +566,10 @@
make_parts(chosen_name, parts, ci->symlinks); #define ALGORITHM_RIGHT_ASYMMETRIC 1
return fd; #define ALGORITHM_LEFT_SYMMETRIC 2
} #define ALGORITHM_RIGHT_SYMMETRIC 3
- usleep(200000); +
+ nanosleep(&((struct timespec) {0, 200000000L}), NULL); +#define usleep(x) xx_usleep(x)
} +static inline void xx_usleep(unsigned k)
return -1; +{
} + const struct timespec t = { k/1000000UL, (k%1000000UL)*1000UL };
--- mdadm-2.6.7/Assemble.c.orig 2010-09-29 19:35:11.139790606 +0200 + nanosleep(&t, NULL);
+++ mdadm-2.6.7/Assemble.c 2010-09-29 19:34:50.957370956 +0200 +}
@@ -956,7 +956,7 @@
break;
close(mdfd);
}
- usleep(usecs);
+ nanosleep(&((struct timespec){0,(usecs) * 1000ul}), NULL);
usecs <<= 1;
}
}

Loading…
Cancel
Save