mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +00:00
Assume __zipos_close when closing a zipos fd
This commit is contained in:
parent
3b302e6379
commit
7a05fb43ac
1 changed files with 3 additions and 7 deletions
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/calls/state.internal.h"
|
||||
|
@ -49,14 +50,9 @@ static int close_impl(int fd) {
|
|||
}
|
||||
|
||||
if (__isfdkind(fd, kFdZip)) {
|
||||
if (_weaken(__zipos_close)) {
|
||||
unassert(_weaken(__zipos_close));
|
||||
return _weaken(__zipos_close)(fd);
|
||||
}
|
||||
if (!IsWindows() && !IsMetal()) {
|
||||
sys_close(fd);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!IsWindows() && !IsMetal()) {
|
||||
return sys_close(fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue