From 27b067f87b85f0466d00707bff4817d8850d0ef2 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 21 Mar 2008 07:26:25 -0700 Subject: [PATCH] Changed d_name() to be a static inline function. --- ifuncs.h | 10 ++++++++++ syscall.c | 9 --------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ifuncs.h b/ifuncs.h index 68130890..e032c67f 100644 --- a/ifuncs.h +++ b/ifuncs.h @@ -57,6 +57,16 @@ from_wire_mode(int mode) return mode; } +static inline char * +d_name(struct dirent *di) +{ +#ifdef HAVE_BROKEN_READDIR + return (di->d_name - 2); +#else + return di->d_name; +#endif +} + static inline int isDigit(const char *ptr) { diff --git a/syscall.c b/syscall.c index d4ff3f91..f1b73ea0 100644 --- a/syscall.c +++ b/syscall.c @@ -282,12 +282,3 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence) return lseek(fd, offset, whence); #endif } - -char *d_name(struct dirent *di) -{ -#ifdef HAVE_BROKEN_READDIR - return (di->d_name - 2); -#else - return di->d_name; -#endif -} -- 2.34.1