From c453135789597648ef5aa641c4e59bb5b5e320de Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 12 Sep 2007 11:48:48 -0600 Subject: Added idr_replace() function which was apparently added in Linux 2.6.18 Someone should probably double-check my work here since this is the first time I've touched drm_compat.[ch] --- linux-core/drm_compat.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 0b00ba47..94db8533 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -316,4 +316,9 @@ int idr_for_each(struct idr *idp, void idr_remove_all(struct idr *idp); #endif + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) +void *idr_replace(struct idr *idp, void *ptr, int id); +#endif + #endif -- cgit v1.2.3 From 41345b95a2cdc1e509171d31fc8aed8cecb43dbd Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 12 Sep 2007 12:05:15 -0600 Subject: Added bool typedef added in kernel 2.6.19 This allows the xgi code to compile with older kernels. --- linux-core/drm_compat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 94db8533..870f8b73 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -321,4 +321,8 @@ void idr_remove_all(struct idr *idp); void *idr_replace(struct idr *idp, void *ptr, int id); #endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) +typedef _Bool bool; +#endif + #endif -- cgit v1.2.3