kmodloader: force size argument for syscall to unsigned long to fix issues with musl
authorFelix Fietkau <nbd@openwrt.org>
Wed, 28 May 2014 21:28:28 +0000 (23:28 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 28 May 2014 21:28:28 +0000 (23:28 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
kmodloader.c

index 770484b34cc8ecec2f8ea0d00c37249794139e32..633570fd5b84bfe2b8cc1fb0b87fcc21ebc24c4d 100644 (file)
@@ -420,7 +420,7 @@ static int insert_module(char *path, const char *options)
 
        data = malloc(s.st_size);
        if (read(fd, data, s.st_size) == s.st_size)
-               ret = syscall(__NR_init_module, data, s.st_size, options);
+               ret = syscall(__NR_init_module, data, (unsigned long) s.st_size, options);
        else
                LOG("failed to read full module %s\n", path);