[PATCH v2 1/2] time applet: fix a build problem with kernel versions missing O_CLOEXEC symbol

2017-10-18 Thread Eugene Rudoy
Kernel versions < 2.6.23 do not support/provide O_CLOEXEC symbol causing the time applet not to compile: time.c: In function 'time_main': time.c:445:28: error: 'O_CLOEXEC' undeclared (first use in this function) time.c:445:28: note: each undeclared identifier is reported only once for each

[PATCH v2 2/2] iproute/iprule: restore support for kernel versions missing RTA_TABLE routing attribute

2017-10-18 Thread Eugene Rudoy
iproute/iprule applets fail to compile when compiled using kernel versions < 2.6.19 iproute.c: In function 'print_route': iproute.c:85:9: error: 'RTA_TABLE' undeclared (first use in this function) iproute.c:85:9: note: each undeclared identifier is reported only once for each function it

Re: [PATCH 1/2] fix O_CLOEXEC related build problems with kernel versions < 2.6.23

2017-10-18 Thread Eugene Rudoy
Hi Ralf, On Wed, Oct 18, 2017 at 12:31 PM, Ralf Friedl wrote: > What is the purpose of O_CLOEXEC here? In both cases, we try to open a file. > If the file is opened, we use the finit_module syscall and immediately close > the file. Is there a danger that finit_module

Re: [PATCH 1/2] fix O_CLOEXEC related build problems with kernel versions < 2.6.23

2017-10-18 Thread Eugene Rudoy
Hi Walter, On Wed, Oct 18, 2017 at 6:27 PM, walter harms wrote: > while you are there ... > please be more verbose "Do not use O_CLOEXEC flags" is nice but why ? hmm, as the subject line states the change fixes the *build* problems with *kernel* versions < 2.6.23, e.g.

Re: [PATCH 1/2] fix O_CLOEXEC related build problems with kernel versions < 2.6.23

2017-10-18 Thread walter harms
Am 18.10.2017 18:23, schrieb Eugene Rudoy: > Hi Xabier, > > On Wed, Oct 18, 2017 at 8:52 AM, Xabier Oneca -- xOneca > wrote: >> >> Doesn't xopen always guarantee output_fd will be valid? If so, there's >> no need for this 'if'. > you're right, s. [1]. Didn't know that before,

Re: [PATCH 1/2] fix O_CLOEXEC related build problems with kernel versions < 2.6.23

2017-10-18 Thread Eugene Rudoy
Hi Xabier, On Wed, Oct 18, 2017 at 8:52 AM, Xabier Oneca -- xOneca wrote: > > Doesn't xopen always guarantee output_fd will be valid? If so, there's > no need for this 'if'. you're right, s. [1]. Didn't know that before, thanks for pointing it out. v2 of the patch will follow.

Re: [PATCH 1/2] fix O_CLOEXEC related build problems with kernel versions < 2.6.23

2017-10-18 Thread Ralf Friedl
Eugene Rudoy wrote: Do not use O_CLOEXEC flags (available since 2.6.23), use close_on_exec_on provided by libbb instead (like everywhere else) Signed-off-by: Eugene Rudoy --- miscutils/time.c | 6 -- modutils/modprobe-small.c | 3 ++- modutils/modutils.c

Re: [PATCH 2/2] iproute/iprule: restore support for kernel versions < 2.6.19

2017-10-18 Thread walter harms
Am 17.10.2017 23:33, schrieb Eugene Rudoy: > broken in b42107f21538e39d9a344376372f8261aed589b2 > > Signed-off-by: Eugene Rudoy > --- > networking/libiproute/iproute.c | 9 + > networking/libiproute/iprule.c | 12 +++- > 2 files changed, 20

Re: [PATCH 1/2] fix O_CLOEXEC related build problems with kernel versions < 2.6.23

2017-10-18 Thread Xabier Oneca -- xOneca
Hello Eugene, Comments inline. 2017-10-17 23:33 GMT+02:00 Eugene Rudoy : > Do not use O_CLOEXEC flags (available since 2.6.23), > use close_on_exec_on provided by libbb instead (like everywhere else) > > Signed-off-by: Eugene Rudoy > --- >