Hi all,

I can't build tracker0.6.93 successfully because O_NOATIME is not defined in Solaris. I have made a patch to ignore it. I think it won't have much effect, will it?

--
Regards,
Lacey
diff -ur tracker-0.6.93-orig/src/libtracker-common/tracker-file-utils.c 
tracker-0.6.93/src/libtracker-common/tracker-file-utils.c
--- tracker-0.6.93-orig/src/libtracker-common/tracker-file-utils.c      
2009-04-10 11:36:09.518509000 +0800
+++ tracker-0.6.93/src/libtracker-common/tracker-file-utils.c   2009-04-10 
11:37:16.632203000 +0800
@@ -64,10 +64,12 @@
 
                fd = fileno (file);
                
+#if defined(__linux__)
                /* Make sure we set the NOATIME flag if we have permissions to 
*/
                if ((flags = fcntl (fd, F_GETFL, 0)) != -1) {
                        fcntl (fd, F_SETFL, flags | O_NOATIME);
                }
+#endif
 
 #ifdef HAVE_POSIX_FADVISE
                if (sequential_access) {
diff -ur tracker-0.6.93-orig/src/tracker-extract/tracker-extract-mp3.c 
tracker-0.6.93/src/tracker-extract/tracker-extract-mp3.c
--- tracker-0.6.93-orig/src/tracker-extract/tracker-extract-mp3.c       
2009-04-10 11:52:00.654303000 +0800
+++ tracker-0.6.93/src/tracker-extract/tracker-extract-mp3.c    2009-04-10 
11:49:51.537212000 +0800
@@ -1513,6 +1513,7 @@
                return;
        }
 
+#if defined(__linux__)
        /* Can return -1 because of O_NOATIME, so we try again after
         * without as a last resort. This can happen due to
         * permissions.
@@ -1525,6 +1526,13 @@
                        return;
                }
        }
+#else
+       fd = open (filename, O_RDONLY);
+
+       if (fd == -1){
+               return;
+       }
+#endif
 
 #ifdef HAVE_POSIX_FADVISE
        posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
_______________________________________________
tracker-list mailing list
tracker-list@gnome.org
http://mail.gnome.org/mailman/listinfo/tracker-list

Reply via email to