Merge branch 'ldflags' of https://github.com/sfabbro/OpenBLAS into sfabbro-ldflags
authorZhang Xianyi <traits.zhang@gmail.com>
Sat, 27 Jul 2013 14:19:54 +0000 (22:19 +0800)
committerZhang Xianyi <traits.zhang@gmail.com>
Sat, 27 Jul 2013 14:19:54 +0000 (22:19 +0800)
driver/others/init.c

index 4efc281..5da71ce 100644 (file)
@@ -83,6 +83,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <dirent.h>
 #include <dlfcn.h>
 #include <unistd.h>
+#include <string.h>
 
 #define MAX_NODES      16
 #define MAX_CPUS       256
@@ -315,7 +316,7 @@ static int numa_check(void) {
   }
 
   while ((dir = readdir(dp)) != NULL) {
-    if (*(unsigned int *) dir -> d_name == 0x065646f6eU) {
+    if (strncmp(dir->d_name, "node", 4)==0) {
 
       node = atoi(&dir -> d_name[4]);