summaryrefslogtreecommitdiff
path: root/driver/others/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/others/init.c')
-rw-r--r--driver/others/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/driver/others/init.c b/driver/others/init.c
index 4efc2816a..5da71cec1 100644
--- a/driver/others/init.c
+++ b/driver/others/init.c
@@ -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]);