Blame SOURCES/0020-RHBZ-907360-static-pthread-init.patch

4728c8
---
4728c8
 libmultipath/uevent.c |   12 ++++--------
4728c8
 1 file changed, 4 insertions(+), 8 deletions(-)
4728c8
4728c8
Index: multipath-tools-130222/libmultipath/uevent.c
4728c8
===================================================================
4728c8
--- multipath-tools-130222.orig/libmultipath/uevent.c
4728c8
+++ multipath-tools-130222/libmultipath/uevent.c
4728c8
@@ -53,8 +53,10 @@ typedef int (uev_trigger)(struct uevent
4728c8
 
4728c8
 pthread_t uevq_thr;
4728c8
 LIST_HEAD(uevq);
4728c8
-pthread_mutex_t uevq_lock, *uevq_lockp = &uevq_lock;
4728c8
-pthread_cond_t  uev_cond,  *uev_condp  = &uev_cond;
4728c8
+pthread_mutex_t uevq_lock = PTHREAD_MUTEX_INITIALIZER;
4728c8
+pthread_mutex_t *uevq_lockp = &uevq_lock;
4728c8
+pthread_cond_t uev_cond = PTHREAD_COND_INITIALIZER;
4728c8
+pthread_cond_t *uev_condp = &uev_cond;
4728c8
 uev_trigger *my_uev_trigger;
4728c8
 void * my_trigger_data;
4728c8
 int servicing_uev;
4728c8
@@ -409,10 +411,6 @@ int uevent_listen(void)
4728c8
 	 * thereby not getting to empty the socket's receive buffer queue
4728c8
 	 * often enough.
4728c8
 	 */
4728c8
-	INIT_LIST_HEAD(&uevq);
4728c8
-
4728c8
-	pthread_mutex_init(uevq_lockp, NULL);
4728c8
-	pthread_cond_init(uev_condp, NULL);
4728c8
 	pthread_cleanup_push(uevq_stop, NULL);
4728c8
 
4728c8
 	monitor = udev_monitor_new_from_netlink(conf->udev, "udev");
4728c8
@@ -525,8 +523,6 @@ out:
4728c8
 	if (need_failback)
4728c8
 		err = failback_listen();
4728c8
 	pthread_cleanup_pop(1);
4728c8
-	pthread_mutex_destroy(uevq_lockp);
4728c8
-	pthread_cond_destroy(uev_condp);
4728c8
 	return err;
4728c8
 }
4728c8