* [PATCH] sys-utils/Makemodule.am: fix parallel build issue
@ 2015-08-31 8:23 Chen Qi
2015-08-31 8:23 ` include errno.h instead of argp.h Chen Qi
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Chen Qi @ 2015-08-31 8:23 UTC (permalink / raw)
To: util-linux
From: Robert Yang <liezhi.yang@windriver.com>
The rule SETARCH_MAN_LINKS is used for the files under the sys-utils
dir, for example:
echo ".so man8/setarch.8" > sys-utils/linux32.8
but it depends on nothing so that the sys-utils dir may not exist, we
can create the sys-utils dir to fix problem.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
sys-utils/Makemodule.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am
index 6265282..62ead37 100644
--- a/sys-utils/Makemodule.am
+++ b/sys-utils/Makemodule.am
@@ -124,6 +124,7 @@ man_MANS += $(SETARCH_MAN_LINKS)
CLEANFILES += $(SETARCH_MAN_LINKS)
$(SETARCH_MAN_LINKS):
+ $(MKDIR_P) sys-utils
$(AM_V_GEN)echo ".so man8/setarch.8" > $@
install-exec-hook-setarch:
--
1.8.2.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* include errno.h instead of argp.h
2015-08-31 8:23 [PATCH] sys-utils/Makemodule.am: fix parallel build issue Chen Qi
@ 2015-08-31 8:23 ` Chen Qi
2015-08-31 9:33 ` Karel Zak
2015-08-31 8:23 ` replace siginterrupt with sigaction Chen Qi
2015-08-31 9:27 ` [PATCH] sys-utils/Makemodule.am: fix parallel build issue Karel Zak
2 siblings, 1 reply; 6+ messages in thread
From: Chen Qi @ 2015-08-31 8:23 UTC (permalink / raw)
To: util-linux
configure should include errno.h instead of argp.h when
checking for presence of program_invocation_short_name
uclibc defines this to be const char* unlike util-linux-ng
which defines this to be char* so this error goes unnoticed
on glibc/eglibc systems.
here is the error it fixes
in file included from mountP.h:14:0,
from cache.c:29:
/home/kraj/work/slugos/build/tmp-slugos-uclibc/sysroots/nslu2le/usr/include/errno.h:55:46: error: conflicting types for '__progname'
../../../include/c.h:118:14: note: previous declaration of '__progname' was here
make[3]: *** [cache.lo] Error 1
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jonathan Liu <net147@gmail.com>
Index: util-linux-2.22.1/configure.ac
===================================================================
--- util-linux-2.22.1.orig/configure.ac
+++ util-linux-2.22.1/configure.ac
@@ -372,7 +372,7 @@ esac
AC_MSG_CHECKING([whether program_invocation_short_name is defined])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include <argp.h>
+ #include <errno.h>
]], [[
program_invocation_short_name = "test";
]])], [
^ permalink raw reply [flat|nested] 6+ messages in thread
* replace siginterrupt with sigaction
2015-08-31 8:23 [PATCH] sys-utils/Makemodule.am: fix parallel build issue Chen Qi
2015-08-31 8:23 ` include errno.h instead of argp.h Chen Qi
@ 2015-08-31 8:23 ` Chen Qi
2015-08-31 9:37 ` Karel Zak
2015-08-31 9:27 ` [PATCH] sys-utils/Makemodule.am: fix parallel build issue Karel Zak
2 siblings, 1 reply; 6+ messages in thread
From: Chen Qi @ 2015-08-31 8:23 UTC (permalink / raw)
To: util-linux
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
login-utils/login.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/login-utils/login.c b/login-utils/login.c
index ebb76f5..38c881b 100644
--- a/login-utils/login.c
+++ b/login-utils/login.c
@@ -1110,6 +1110,7 @@ int main(int argc, char **argv)
char *buff;
int childArgc = 0;
int retcode;
+ struct sigaction act;
char *pwdbuf = NULL;
struct passwd *pwd = NULL, _pwd;
@@ -1123,7 +1124,9 @@ int main(int argc, char **argv)
timeout = (unsigned int)getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT);
signal(SIGALRM, timedout);
- siginterrupt(SIGALRM, 1); /* we have to interrupt syscalls like ioctl() */
+ (void) sigaction(SIGALRM, NULL, &act);
+ act.sa_flags &= ~SA_RESTART;
+ sigaction(SIGALRM, &act, NULL);
alarm(timeout);
signal(SIGQUIT, SIG_IGN);
signal(SIGINT, SIG_IGN);
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] sys-utils/Makemodule.am: fix parallel build issue
2015-08-31 8:23 [PATCH] sys-utils/Makemodule.am: fix parallel build issue Chen Qi
2015-08-31 8:23 ` include errno.h instead of argp.h Chen Qi
2015-08-31 8:23 ` replace siginterrupt with sigaction Chen Qi
@ 2015-08-31 9:27 ` Karel Zak
2 siblings, 0 replies; 6+ messages in thread
From: Karel Zak @ 2015-08-31 9:27 UTC (permalink / raw)
To: Chen Qi; +Cc: util-linux
On Mon, Aug 31, 2015 at 04:23:44PM +0800, Chen Qi wrote:
> --- a/sys-utils/Makemodule.am
> +++ b/sys-utils/Makemodule.am
> @@ -124,6 +124,7 @@ man_MANS += $(SETARCH_MAN_LINKS)
> CLEANFILES += $(SETARCH_MAN_LINKS)
>
> $(SETARCH_MAN_LINKS):
> + $(MKDIR_P) sys-utils
> $(AM_V_GEN)echo ".so man8/setarch.8" > $@
Already fixed:
git blame -L165,+1 sys-utils/Makemodule.am
1eb19118 (Mike Frysinger 2015-05-03 23:51:04 -0400 165) $(AM_V_at) test -d $(dir $@) || mkdir -p $(dir $@)
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: include errno.h instead of argp.h
2015-08-31 8:23 ` include errno.h instead of argp.h Chen Qi
@ 2015-08-31 9:33 ` Karel Zak
0 siblings, 0 replies; 6+ messages in thread
From: Karel Zak @ 2015-08-31 9:33 UTC (permalink / raw)
To: Chen Qi; +Cc: util-linux
On Mon, Aug 31, 2015 at 04:23:45PM +0800, Chen Qi wrote:
> Index: util-linux-2.22.1/configure.ac
We're just working on v2.27 :-)
> ===================================================================
> --- util-linux-2.22.1.orig/configure.ac
> +++ util-linux-2.22.1/configure.ac
> @@ -372,7 +372,7 @@ esac
>
> AC_MSG_CHECKING([whether program_invocation_short_name is defined])
> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> - #include <argp.h>
> + #include <errno.h>
anyway, you're probably right.
It seems that our original AC_COMPILE_IFELSE() is copy & past from gnulib, but
gnulib checks for errno.h and then it uses the result by #ifdefs in the private
copy of the argp.h. The original author probably miss this detail.
Applied, thanks!
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: replace siginterrupt with sigaction
2015-08-31 8:23 ` replace siginterrupt with sigaction Chen Qi
@ 2015-08-31 9:37 ` Karel Zak
0 siblings, 0 replies; 6+ messages in thread
From: Karel Zak @ 2015-08-31 9:37 UTC (permalink / raw)
To: Chen Qi; +Cc: util-linux
On Mon, Aug 31, 2015 at 04:23:46PM +0800, Chen Qi wrote:
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> login-utils/login.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/login-utils/login.c b/login-utils/login.c
> index ebb76f5..38c881b 100644
> --- a/login-utils/login.c
> +++ b/login-utils/login.c
> @@ -1110,6 +1110,7 @@ int main(int argc, char **argv)
> char *buff;
> int childArgc = 0;
> int retcode;
> + struct sigaction act;
>
> char *pwdbuf = NULL;
> struct passwd *pwd = NULL, _pwd;
> @@ -1123,7 +1124,9 @@ int main(int argc, char **argv)
> timeout = (unsigned int)getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT);
>
> signal(SIGALRM, timedout);
> - siginterrupt(SIGALRM, 1); /* we have to interrupt syscalls like ioctl() */
> + (void) sigaction(SIGALRM, NULL, &act);
> + act.sa_flags &= ~SA_RESTART;
> + sigaction(SIGALRM, &act, NULL);
Applied, thanks.
(Please, next time be more verbose in commit message why you want to
do the change -- I have added a note that siginterrupt is obsolete).
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-08-31 9:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-31 8:23 [PATCH] sys-utils/Makemodule.am: fix parallel build issue Chen Qi
2015-08-31 8:23 ` include errno.h instead of argp.h Chen Qi
2015-08-31 9:33 ` Karel Zak
2015-08-31 8:23 ` replace siginterrupt with sigaction Chen Qi
2015-08-31 9:37 ` Karel Zak
2015-08-31 9:27 ` [PATCH] sys-utils/Makemodule.am: fix parallel build issue Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox