forked from KolibriOS/kolibrios
75cc884573
Added missing dirent impl git-svn-id: svn://kolibrios.org@9955 a494cfbc-eb01-0410-851d-a64ba20cac60
26 lines
394 B
C
26 lines
394 B
C
/*
|
|
* Copyright (C) KolibriOS team 2024. All rights reserved.
|
|
* Distributed under terms of the GNU General Public License
|
|
*/
|
|
|
|
#include <dirent.h>
|
|
#include <errno.h>
|
|
#include <stdlib.h>
|
|
|
|
int
|
|
_DEFUN(closedir, (dirp),
|
|
register DIR *dirp)
|
|
{
|
|
if (!dirp)
|
|
{
|
|
errno = EBADF;
|
|
return -1;
|
|
}
|
|
|
|
if (dirp->path)
|
|
free(dirp->path);
|
|
|
|
free(dirp);
|
|
return 0;
|
|
}
|