[PATCH] fix compilation under uClibc-ng

5 views
Skip to first unread message

Rosen Penev

unread,
Jan 17, 2021, 4:48:00 PMJan 17
to klis...@googlegroups.com
Signed-off-by: Rosen Penev <ros...@gmail.com>
---
clish/shell/shell_execute.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/clish/shell/shell_execute.c b/clish/shell/shell_execute.c
index 0a21408..07f6f14 100644
--- a/clish/shell/shell_execute.c
+++ b/clish/shell/shell_execute.c
@@ -19,12 +19,14 @@
#include <signal.h>
#include <fcntl.h>

+#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_OBSOLETE_BSD_SIGNAL__)
/* Empty signal handler to ignore signal but don't use SIG_IGN. */
static void sigignore(int signo)
{
signo = signo; /* Happy compiler */
return;
}
+#endif

/*-------------------------------------------------------- */
static int clish_shell_lock(const char *lock_path)
--
2.17.1

Serj Kalichev

unread,
Jan 18, 2021, 7:51:01 AMJan 18
to klis...@googlegroups.com
Explain your patch please.
Firstly compiler will not find sigignore() function when #ifdef is false.

Note SIG_IGN as a signal handler and empty signal handler like
sigignore() are not the same.


18.01.2021 00:47, Rosen Penev пишет:
Reply all
Reply to author
Forward
0 new messages