File qc-usb-messenger-sem_getcount.patch of Package quickcam

---
 quickcam.h |    4 ++++
 1 file changed, 4 insertions(+)

--- a/quickcam.h
+++ b/quickcam.h
@@ -242,7 +242,11 @@ struct usb_ctrlrequest {
 #if LINUX_VERSION_CODE<KERNEL_VERSION(2,4,20) || LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,0)
 /* Things come and go... */
 /* Used only for debugging, so this could be actually removed if needed */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
 #define sem_getcount(sem)	atomic_read(&(sem)->count)
+#else
+#define sem_getcount(sem)	((sem)->count)
+#endif
 #endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
openSUSE Build Service is sponsored by