OSDN Git Service

Fix build error when lstat is not supported
authorYohei Endo <yoheie@gmail.com>
Mon, 30 Nov 2015 13:24:01 +0000 (22:24 +0900)
committerYohei Endo <yoheie@gmail.com>
Mon, 30 Nov 2015 13:24:01 +0000 (22:24 +0900)
src/lhext.c

index d386bac..38447c2 100644 (file)
@@ -99,6 +99,7 @@ make_name_with_pathcheck(char *name, size_t namesz, const char *q)
         offset += sz;
     }
 
+#ifdef S_IFLNK
     while ((p = strchr(q, '/')) != NULL) {
         if (namesz - offset < (p - q) + 2) {
             return FALSE;
@@ -118,6 +119,7 @@ make_name_with_pathcheck(char *name, size_t namesz, const char *q)
         }
         name[offset++] = '/';
     }
+#endif
 
     str_safe_copy(name + offset, q, namesz - offset);