Blame SOURCES/0001-top-add-the-major-version-to-dlopen-of-libnuma-sonam.patch

2006ba
From a6dfe2648a39d5fed8de0361aecf0e035ad80222 Mon Sep 17 00:00:00 2001
2006ba
From: Jim Warner <james.warner@comcast.net>
2006ba
Date: Thu, 6 Jun 2013 00:00:00 -0500
2006ba
Subject: [PATCH] top: add the major version to dlopen of libnuma soname
2006ba

2006ba
When the plug-in approach to NUMA support was added, I
2006ba
carelessly employed the compile-time linker convention
2006ba
for naming the library. Technically this then required
2006ba
the 'devel' package for NUMA support to be present for
2006ba
the unqualified soname symlink to be available. Either
2006ba
that or one must have manually created such a symlink.
2006ba

2006ba
This commit adds the missing major version to dlopen()
2006ba
of libnuma.so.1 so simply having a more likely package
2006ba
such as 'numactl' will enable both '2' & '3' commands.
2006ba

2006ba
References(s):
2006ba
http://www.freelists.org/post/procps/top-NUMA-node-CPU-utilization-support,25
2006ba
. initial dlopen support
2006ba
commit edba932a7e9b950dd91bc486e107788e977a5186
2006ba

2006ba
Signed-off-by: Jim Warner <james.warner@comcast.net>
2006ba
---
2006ba
 top/top.c | 2 +-
2006ba
 1 file changed, 1 insertion(+), 1 deletion(-)
2006ba

2006ba
diff --git a/top/top.c b/top/top.c
2006ba
index c1853ee..1d38c0f 100644
2006ba
--- a/top/top.c
2006ba
+++ b/top/top.c
2006ba
@@ -3246,7 +3246,7 @@ static void before (char *me) {
2006ba
 #if defined(PRETEND_NUMA) || defined(PRETEND8CPUS)
2006ba
    Numa_node_tot = Numa_max_node() + 1;
2006ba
 #else
2006ba
-   Libnuma_handle = dlopen("libnuma.so", RTLD_LAZY);
2006ba
+   Libnuma_handle = dlopen("libnuma.so.1", RTLD_LAZY);
2006ba
    if (Libnuma_handle) {
2006ba
       Numa_max_node = dlsym(Libnuma_handle, "numa_max_node");
2006ba
       Numa_node_of_cpu = dlsym(Libnuma_handle, "numa_node_of_cpu");
2006ba
-- 
2006ba
1.8.1.2
2006ba