diff options
author | Ian Campbell <ian.campbell@xensource.com> | 2006-10-25 13:58:30 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@xensource.com> | 2006-10-25 13:58:30 +0100 |
commit | 4bfff95df70a42b4540928566e664c0349cbd8cc (patch) | |
tree | 9547478691c541df5a98fc8b73f865e24b8183d7 /unmodified_drivers/linux-2.6/platform-pci/platform-compat.c | |
parent | f3bebe5fecaa3bcee1f21fe528c0de85725d7715 (diff) | |
download | xen-4bfff95df70a42b4540928566e664c0349cbd8cc.tar.gz xen-4bfff95df70a42b4540928566e664c0349cbd8cc.tar.bz2 xen-4bfff95df70a42b4540928566e664c0349cbd8cc.zip |
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@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Diffstat (limited to 'unmodified_drivers/linux-2.6/platform-pci/platform-compat.c')
-rw-r--r-- | unmodified_drivers/linux-2.6/platform-pci/platform-compat.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c index c6fa5b81da..6538964ecf 100644 --- a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c @@ -9,3 +9,23 @@ 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 |