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
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
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
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.
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,
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.
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
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
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
> ---
>