Make it run on Linux.
This commit is contained in:
parent
7a2cc02ba8
commit
2e56f726c3
2
Makefile
2
Makefile
@ -1,6 +1,8 @@
|
|||||||
|
ifeq ($(shell uname -s),Darwin)
|
||||||
AS=x86_64-elf-as
|
AS=x86_64-elf-as
|
||||||
LD=x86_64-elf-ld
|
LD=x86_64-elf-ld
|
||||||
CC=x86_64-elf-gcc
|
CC=x86_64-elf-gcc
|
||||||
|
endif
|
||||||
|
|
||||||
run: image.bin
|
run: image.bin
|
||||||
qemu-system-i386 -drive format=raw,file=$< -serial mon:stdio
|
qemu-system-i386 -drive format=raw,file=$< -serial mon:stdio
|
||||||
|
|||||||
@ -60,7 +60,8 @@ int main(int argc, char* argv[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dirent->reserved = 0;
|
dirent->reserved = 0;
|
||||||
strlcpy(dirent->name, basename(name), sizeof(dirent->name));
|
dirent->name[sizeof(dirent->name) - 1] = '\0';
|
||||||
|
strncpy(dirent->name, basename(name), sizeof(dirent->name) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
fseek(image, 0, SEEK_SET);
|
fseek(image, 0, SEEK_SET);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user