X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Freaddir.c;h=b8f5fea80f898045ce28c6685a90345e007af8ff;hb=f5bfc68fdb3e25b9d75c65e3f5e88983584b25ed;hp=ab42dfd2023f3e1127f7218d08452df8393b8a9f;hpb=84fc760439e82e6b3616abd0d1f9bd7d7eb01ec0;p=libguestfs.git diff --git a/daemon/readdir.c b/daemon/readdir.c index ab42dfd..b8f5fea 100644 --- a/daemon/readdir.c +++ b/daemon/readdir.c @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include @@ -74,6 +74,7 @@ do_readdir (const char *path) ret->guestfs_int_dirent_list_val = p; v.ino = d->d_ino; +#ifdef HAVE_STRUCT_DIRENT_D_TYPE switch (d->d_type) { case DT_BLK: v.ftyp = 'b'; break; case DT_CHR: v.ftyp = 'c'; break; @@ -85,6 +86,9 @@ do_readdir (const char *path) case DT_UNKNOWN: v.ftyp = 'u'; break; default: v.ftyp = '?'; break; } +#else + v.ftyp = 'u'; +#endif ret->guestfs_int_dirent_list_val[i] = v;