You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.4 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../mdadm/mdadm-2.6.7-no-susv3-legacy.patch
# Copyright (C) 2010 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
Description: Replace usleep() with nanosleep()
usleep() was deprecated by SUSv3 and newer LIBCs are starting to enforce that
deprecation.
--- mdadm-2.6.7/mdopen.c.orig 2010-09-29 19:01:38.854974364 +0200
+++ mdadm-2.6.7/mdopen.c 2010-09-29 19:03:34.302325754 +0200
@@ -342,7 +342,7 @@
make_parts(chosen_name, parts, ci->symlinks);
return fd;
}
- usleep(200000);
+ nanosleep(&((struct timespec) {0, 200000000L}), NULL);
}
return -1;
}
--- mdadm-2.6.7/Assemble.c.orig 2010-09-29 19:35:11.139790606 +0200
+++ 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;
}
}