mirror of https://git.musl-libc.org/git/musl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
192 B
9 lines
192 B
#include <stdio.h>
|
|
#include <errno.h>
|
|
#include "syscall.h"
|
|
|
|
int remove(const char *path)
|
|
{
|
|
int r = syscall(SYS_unlink, path);
|
|
return (r && errno == EISDIR) ? syscall(SYS_rmdir, path) : r;
|
|
}
|
|
|