Re: [PATCH] nat/fork-inferior: include linux-ptrace.h

Pedro Alves
2018-06-27T16:32:43Z

On 06/27/2018 03:34 PM, Simon Marchi wrote:
> On 2018-06-27 10:31, Thomas Petazzoni wrote:
>>> fork-inferior.c is also included in native builds for BSDs, AIX, Solaris
>>> and Darwin (see gdb/configure.nat).Â  I am a bit concerned that
>>> linux-ptrace.h could use some Linux-specific things, and thus would
>>> break the other builds.Â  However, I built-tested on FreeBSD and it seems
>>> fine.Â  Worst case, we can probably wrap this include in "#ifdef
>>> __linux__" if that becomes a problem.
>>
>> Or better, this horrible mess of __UCLIBC__ and HAS_NOMMU macros should
>> be replaced by a proper autoconf check testing for the availability of
>> fork().
>
> Agreed, and I think Pedro will agree too (unless you can think of a simpler solution that doesn't involve autoconf?).

That does sound better.

Thanks,
Pedro Alves