mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-01 14:55:12 +00:00
add def of dirfd() for those without it
This commit is contained in:
4
getcwd.c
4
getcwd.c
@@ -72,6 +72,10 @@
|
|||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
|
||||||
|
#ifndef dirfd
|
||||||
|
# define dirfd(dirp) ((dirp)->dd_fd)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ISDOT(dp) \
|
#define ISDOT(dp) \
|
||||||
(dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
|
(dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
|
||||||
(dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
|
(dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
|
||||||
|
Reference in New Issue
Block a user