[gnome-disk-utility] build: stop checking for fallocate



commit 2d0c584840c70b42b6f67be0c397b5e4166ccd5b
Author: Helmut Grohne <helmut subdivi de>
Date:   Sat Dec 29 17:10:39 2018 -0500

    build: stop checking for fallocate
    
    https://bugs.debian.org/917639

 meson.build                          | 18 ------------------
 src/disks/gducreatediskimagedialog.c |  2 --
 2 files changed, 20 deletions(-)
---
diff --git a/meson.build b/meson.build
index aa05fb0d..060871c2 100644
--- a/meson.build
+++ b/meson.build
@@ -23,24 +23,6 @@ config_h = configuration_data()
 config_h.set_quoted('PACKAGE_VERSION', gdu_version)
 config_h.set_quoted('GETTEXT_PACKAGE', gdu_name)
 
-message('Checking for valid fallocate() function')
-
-fallocate_src = '''
-  #include <unistd.h>
-  #include <sys/types.h>
-  #include <linux/falloc.h>
-  #include <fcntl.h>
-  int main() {
-    long ret;
-
-    ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0xfffffffful, 0xfffffffful);
-    if (ret != 0) {
-      return 1;
-    }
-  };
-'''
-config_h.set('HAVE_FALLOCATE', cc.run(fallocate_src).returncode())
-
 # compiler flags
 compiler_flags = []
 
diff --git a/src/disks/gducreatediskimagedialog.c b/src/disks/gducreatediskimagedialog.c
index a22ef8c8..1b856e0c 100644
--- a/src/disks/gducreatediskimagedialog.c
+++ b/src/disks/gducreatediskimagedialog.c
@@ -733,7 +733,6 @@ copy_thread_func (gpointer user_data)
   /* If supported, allocate space at once to ensure blocks are laid
    * out contigously, see http://lwn.net/Articles/226710/
    */
-#ifdef HAVE_FALLOCATE
   if (G_IS_FILE_DESCRIPTOR_BASED (data->output_file_stream))
     {
       gint output_fd = g_file_descriptor_based_get_fd (G_FILE_DESCRIPTOR_BASED (data->output_file_stream));
@@ -770,7 +769,6 @@ copy_thread_func (gpointer user_data)
       g_mutex_unlock (&data->copy_lock);
       g_idle_add (on_update_job, dialog_data_ref (data));
     }
-#endif
 
   page_size = sysconf (_SC_PAGESIZE);
   buffer_unaligned = g_new0 (guchar, buffer_size + page_size);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]