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

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