mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +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 │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
|
#include "libc/assert.h"
|
||||||
#include "libc/calls/calls.h"
|
#include "libc/calls/calls.h"
|
||||||
#include "libc/calls/internal.h"
|
#include "libc/calls/internal.h"
|
||||||
#include "libc/calls/state.internal.h"
|
#include "libc/calls/state.internal.h"
|
||||||
|
@ -49,13 +50,8 @@ static int close_impl(int fd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__isfdkind(fd, kFdZip)) {
|
if (__isfdkind(fd, kFdZip)) {
|
||||||
if (_weaken(__zipos_close)) {
|
unassert(_weaken(__zipos_close));
|
||||||
return _weaken(__zipos_close)(fd);
|
return _weaken(__zipos_close)(fd);
|
||||||
}
|
|
||||||
if (!IsWindows() && !IsMetal()) {
|
|
||||||
sys_close(fd);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsWindows() && !IsMetal()) {
|
if (!IsWindows() && !IsMetal()) {
|
||||||
|
|
Loading…
Reference in a new issue