4 ms·
> For example, OpenBSD at some point changed how mmap() was defined so that it takes seven arguments: It seems like that was the case from day one, when a copy
by ainar-g 6y ago
> For example, OpenBSD at some point changed how mmap() was defined so that it takes seven arguments:
It seems like that was the case from day one, when a copy of
the NetBSD code was imported to later become OpenBSD[1].
And if my reasoning is correct, saying that OpenBSD
“changed it at some point” is not quite correct.
https://github.com/openbsd/src/blob/df930be708d50e9715f173caa26ffe1b7599b157/lib/libc/sys/mmap.c https://github.com/openbsd/src/blob/df930be708d50e9715f173ca...
- comfydragon 6y agoBut, that link shows mmap taking 6 arguments?
- ainar-g 6y agoThe parent comment talked about the syscall, not the library function. return((caddr_t)(long)__syscall((quad_t)SYS_mmap, addr, len, prot, flags, fd, 0, offset)); The first argument is the syscall number, the rest are the seven arguments in question.