From af0cc139f17ad165203f992e2d79fc60d4b68460 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Thu, 21 Jun 2012 17:44:19 +0000 Subject: xpp: usermode_helper() bugfix for kernels >= 3.3.0 * UMH_WAIT_PROC semantics (and value) was changed from enum to a bitmask (via #define) * This constant was missing from kernels older than 2.6.23 Signed-off-by: Oron Peled Acked-by: Tzafrir Cohen git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10693 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/xpp/card_global.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/dahdi/xpp/card_global.c b/drivers/dahdi/xpp/card_global.c index 29c43f0..dca5aee 100644 --- a/drivers/dahdi/xpp/card_global.c +++ b/drivers/dahdi/xpp/card_global.c @@ -22,6 +22,7 @@ #include #include +#include #include "xdefs.h" #include "xpd.h" #include "xpp_dahdi.h" @@ -655,6 +656,15 @@ static void global_packet_dump(const char *msg, xpacket_t *pack) #define MAX_PATH_STR 128 +#ifndef UMH_WAIT_PROC +/* + * - UMH_WAIT_PROC was introduced as enum in 2.6.23 + * with a value of 1 + * - It was changed to a macro (and it's value was modified) in 3.3.0 + */ +#define UMH_WAIT_PROC 1 +#endif + int run_initialize_registers(xpd_t *xpd) { int ret; @@ -737,7 +747,7 @@ int run_initialize_registers(xpd_t *xpd) } XPD_DBG(DEVICES, xpd, "running '%s' for type=%d revision=%d\n", init_card, xpd->type, xbus->revision); - ret = call_usermodehelper(init_card, argv, envp, 1); + ret = call_usermodehelper(init_card, argv, envp, UMH_WAIT_PROC); /* * Carefully report results */ -- cgit v1.2.3