[gamin] thread safety on RHEL3



Hey folks,

pthread_mutexattr_settype is not defined in RHEL3

Also, I fixed a problem in the same file while I was in there.

Cheers,

C.J.
--- work/main.d/gamin-0.1.8/libgamin/gam_data.c	2006-09-04 19:18:39.000000000 -0700
+++ work-cjac/main.d/gamin-0.1.8/libgamin/gam_data.c	2007-12-18 12:22:05.000000000 -0800
@@ -29,7 +29,7 @@
  * libraries.
  */
 #ifdef __GNUC__
-#ifdef linux || defined(__GLIBC__)
+#if defined(linux) || defined(__GLIBC__)
 #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
 extern int pthread_mutexattr_init(pthread_mutexattr_t *attr)
            __attribute((weak));
@@ -454,7 +454,7 @@
         return (NULL);
     memset(ret, 0, sizeof(GAMData));
     
-#ifdef HAVE_PTHREAD_H
+#if defined(HAVE_PTHREAD_H) && defined(pthread_mutexattr_settype)
     if (is_threaded == -1) {
         if ((pthread_mutexattr_init != NULL) &&
 	    (pthread_mutexattr_settype != NULL) &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]