Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > fd744f5bf1912d9ec03d1cfe191a07d9 > files > 4

dmapi-2.2.12-13.mga9.src.rpm

diff -up ./libdm/dm_handle2path.c.tv ./libdm/dm_handle2path.c
--- ./libdm/dm_handle2path.c.tv	2016-03-13 20:07:29.121798095 +0100
+++ ./libdm/dm_handle2path.c	2016-03-13 20:07:58.000969955 +0100
@@ -25,6 +25,10 @@
 #ifdef linux
 #include "getdents.h"
 #endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
 
 static int getcomp(int dirfd, void *targhanp, size_t targhlen,
 			char *bufp, size_t buflen, size_t *rlenp);
--- ./libdm/getdents.c
+++ ./libdm/getdents.c
@@ -211,6 +211,8 @@
 # endif
     }
 #endif
+
+#ifdef __NR_getdents
   {
     size_t red_nbytes;
     struct kernel_dirent *skdp, *kdp;
@@ -267,6 +269,7 @@
 	kdp = (struct kernel_dirent *) (((char *) kdp) + kdp->d_reclen);
       }
     }
+#endif
 
   return (char *) dp - buf;
 }