zipos_to_fd: support FreeBSD, use mmap instead of read write loop, add tests

This commit is contained in:
Gavin Hayes 2023-02-03 01:07:00 -05:00
parent 4fd1fae5ca
commit df713afa90

View file

@ -101,7 +101,7 @@ TEST(fexecve, APE) {
}
TEST(fexecve, zipos) {
if (!IsLinux()) return;
if (!IsLinux() && !IsFreebsd()) return;
int fd = open("/zip/life.elf", O_RDONLY);
SPAWN(vfork);
if (fd == -1 && errno == ENOSYS) _Exit(42);