[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] PV-on-HVM: Kernels prior to 2.6.8 did not export strcspn to modules
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxxxxx> # Node ID 4dcf172e699e094bc772baa66b9dc93083332941 # Parent 5d2f91f9b2f09fc57d24ef44f3ce31a4f0a9adfb PV-on-HVM: Kernels prior to 2.6.8 did not export strcspn to modules therefore implement our own and export it. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx> Signed-off-by: K. Y. Srinivasan <ksrinivasan@xxxxxxxxxx> Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@xxxxxxxxxxxxxx> --- unmodified_drivers/linux-2.6/platform-pci/platform-compat.c | 20 ++++++++++++ 1 files changed, 20 insertions(+) diff -r 5d2f91f9b2f0 -r 4dcf172e699e unmodified_drivers/linux-2.6/platform-pci/platform-compat.c --- a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c Wed Oct 25 13:58:30 2006 +0100 +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c Wed Oct 25 13:58:30 2006 +0100 @@ -9,3 +9,23 @@ static int system_state = 1; static int system_state = 1; EXPORT_SYMBOL(system_state); #endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8) +size_t strcspn(const char *s, const char *reject) +{ + const char *p; + const char *r; + size_t count = 0; + + for (p = s; *p != '\0'; ++p) { + for (r = reject; *r != '\0'; ++r) { + if (*p == *r) + return count; + } + ++count; + } + + return count; +} +EXPORT_SYMBOL(strcspn); +#endif _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |