Re: [PATCH] build: fix FreeBSD build when sysinfo compat library installed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 07/07/2025 17:51, Ramsay Jones wrote:
> 
> 
> On 07/07/2025 16:40, Junio C Hamano wrote:
>> Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:
>>
>>>>     need to link a separate library (-lsysinfo). (This would require
>>>>     a similar change to meson.build).
>>>>
>>>>   - change the order of the preprocessor conditionals in the total_ram()
>>>>     function in 'builtin/gc.c', so that the *BSD sysctl() function
>>>>     (in the HAVE_BSD_SYSCTL block) takes priority over the sysinfo()
>>>>     function (in the HAVE_SYSINFO block).
>>>>
>>>>   - suppress the setting of HAVE_SYSINFO when HAVE_BSD_SYSCTL has been
>>>>     defined (in both configure.ac and meson.build).
>>>> ...
>>>> The second solution would only be required by the autoconf and meson
>>>> build systems, the Makefile already sets the build variables to the
>>>> required values (since they are not 'auto-detected').
>>> ...
>>> The final solution is almost certainly good enough (and is definitely
>>> simple), although the second solution has the benefit that it "fixes"
>>> the problem once and for all even if someone defines both
>>> HAVE_BSD_SYSCTL and HAVE_SYSINFO (say, in config.mak), assuming I'm
>>> understanding correctly.
>>
>> Yeah, I think I agree with this assessment.
> 
> [Sorry for the late reply - real life keeps getting in the way!]
> 
> Yep, I thought about including this fix *in addition to* the solution
> implemented in this patch, but decided that the chances that anyone would
> set both in a Makefile build was practically zero. (famous last words ;) ).
> 
> Of course, practically zero is not zero, so we could do this in a
> follow-up patch if we wanted to take a more conservative approach.
> (Carlos has a series in progress which would conflict with such a

Sigh, sorry, Carlo.

ATB,
Ramsay Jones






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux