diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-09-27 15:26:40 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-09-27 15:26:40 +0200 |
commit | 225cc1327a9a3786d0c5317ea1a8342f8c04f0d8 (patch) | |
tree | 8381ef0e567df8e46f1cdd2ef7dc5de6ad245734 /scripts/kconfig/mconf.c | |
parent | c4f2d997a40025657de9a9cbf3c963b080d702fb (diff) | |
download | busybox-w32-225cc1327a9a3786d0c5317ea1a8342f8c04f0d8.tar.gz busybox-w32-225cc1327a9a3786d0c5317ea1a8342f8c04f0d8.tar.bz2 busybox-w32-225cc1327a9a3786d0c5317ea1a8342f8c04f0d8.zip |
scripts/kconfig/mconf: work on systems w/o SIGWINCH
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts/kconfig/mconf.c')
-rw-r--r-- | scripts/kconfig/mconf.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 1b0b6ab07..006d03708 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c | |||
@@ -445,6 +445,7 @@ static struct gstr get_relations_str(struct symbol **sym_arr) | |||
445 | 445 | ||
446 | pid_t pid; | 446 | pid_t pid; |
447 | 447 | ||
448 | #ifdef SIGWINCH | ||
448 | static void winch_handler(int sig) | 449 | static void winch_handler(int sig) |
449 | { | 450 | { |
450 | if (!do_resize) { | 451 | if (!do_resize) { |
@@ -452,11 +453,11 @@ static void winch_handler(int sig) | |||
452 | do_resize = 1; | 453 | do_resize = 1; |
453 | } | 454 | } |
454 | } | 455 | } |
456 | #endif | ||
455 | 457 | ||
456 | static int exec_conf(void) | 458 | static int exec_conf(void) |
457 | { | 459 | { |
458 | int pipefd[2], stat, size; | 460 | int pipefd[2], stat, size; |
459 | struct sigaction sa; | ||
460 | sigset_t sset, osset; | 461 | sigset_t sset, osset; |
461 | 462 | ||
462 | sigemptyset(&sset); | 463 | sigemptyset(&sset); |
@@ -465,10 +466,15 @@ static int exec_conf(void) | |||
465 | 466 | ||
466 | signal(SIGINT, SIG_DFL); | 467 | signal(SIGINT, SIG_DFL); |
467 | 468 | ||
468 | sa.sa_handler = winch_handler; | 469 | #ifdef SIGWINCH |
469 | sigemptyset(&sa.sa_mask); | 470 | { |
470 | sa.sa_flags = SA_RESTART; | 471 | struct sigaction sa; |
471 | sigaction(SIGWINCH, &sa, NULL); | 472 | sa.sa_handler = winch_handler; |
473 | sigemptyset(&sa.sa_mask); | ||
474 | sa.sa_flags = SA_RESTART; | ||
475 | sigaction(SIGWINCH, &sa, NULL); | ||
476 | } | ||
477 | #endif | ||
472 | 478 | ||
473 | *argptr++ = NULL; | 479 | *argptr++ = NULL; |
474 | 480 | ||