Changed d_name() to be a static inline function.
authorWayne Davison <wayned@samba.org>
Fri, 21 Mar 2008 14:26:25 +0000 (07:26 -0700)
committerWayne Davison <wayned@samba.org>
Fri, 21 Mar 2008 14:26:25 +0000 (07:26 -0700)
ifuncs.h
syscall.c

index 6813089..e032c67 100644 (file)
--- 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)
 {
index d4ff3f9..f1b73ea 100644 (file)
--- 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
-}