Re: [libvirt] [virt-tools-list] [PATCH] build: fix linker error on FreeBSD

On 10/08/2013 10:21 AM, Giuseppe Scrivano wrote:
Commit 2d74822a9eb4856c7f5216bb92bcb76630660f72 renamed "freebsdNodeGetCPUCount" to "appleFreebsdNodeGetCPUCount", leaving one call to "freebsdNodeGetCPUCount". Fix this other case.
ACK, although it looks like you intended this to go to libvir-list (now cc'd)
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> --- src/nodeinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 320d8f8..702ad7c 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -1056,8 +1056,8 @@ nodeGetCPUCount(void)
VIR_FREE(cpupath); return ncpu; -#elif defined(__FreeBSD__) - return freebsdNodeGetCPUCount(); +#elif defined(__FreeBSD__) || defined(__APPLE__) + return appleFreebsdNodeGetCPUCount (); #else virReportError(VIR_ERR_NO_SUPPORT, "%s", _("host cpu counting not implemented on this platform"));
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Eric Blake writes:
On 10/08/2013 10:21 AM, Giuseppe Scrivano wrote:
Commit 2d74822a9eb4856c7f5216bb92bcb76630660f72 renamed "freebsdNodeGetCPUCount" to "appleFreebsdNodeGetCPUCount", leaving one call to "freebsdNodeGetCPUCount". Fix this other case.
ACK, although it looks like you intended this to go to libvir-list (now cc'd)
I should be more careful with my bash history... What do you think about replacing completely this function with the "nproc" module in gnulib? Giuseppe

On 10/08/2013 12:22 PM, Giuseppe Scrivano wrote:
Eric Blake writes:
On 10/08/2013 10:21 AM, Giuseppe Scrivano wrote:
Commit 2d74822a9eb4856c7f5216bb92bcb76630660f72 renamed "freebsdNodeGetCPUCount" to "appleFreebsdNodeGetCPUCount", leaving one call to "freebsdNodeGetCPUCount". Fix this other case.
ACK, although it looks like you intended this to go to libvir-list (now cc'd)
I should be more careful with my bash history...
What do you think about replacing completely this function with the "nproc" module in gnulib?
Go for it! Gnulib recently relicensed nproc at my request, because I had that eventual conversion in mind, although I obviously haven't been able to get to it myself. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 10/08/2013 10:48 AM, Eric Blake wrote:
On 10/08/2013 10:21 AM, Giuseppe Scrivano wrote:
Commit 2d74822a9eb4856c7f5216bb92bcb76630660f72 renamed "freebsdNodeGetCPUCount" to "appleFreebsdNodeGetCPUCount", leaving one call to "freebsdNodeGetCPUCount". Fix this other case.
ACK, although it looks like you intended this to go to libvir-list (now cc'd)
-#elif defined(__FreeBSD__) - return freebsdNodeGetCPUCount(); +#elif defined(__FreeBSD__) || defined(__APPLE__) + return appleFreebsdNodeGetCPUCount ();
Oh, and this failed 'make syntax-check'; I fixed that and pushed. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Giuseppe Scrivano