[gdk-pixbuf] RLIMIT_AS: make sure it is defined before using it



commit 07c888ca7d6cb0b9675d21e278c28a156684b7ea
Author: Antoine Jacoutot <ajacoutot gnome org>
Date:   Tue Sep 24 11:10:21 2013 +0200

    RLIMIT_AS: make sure it is defined before using it
    
    Not all operating systems provide RLIMIT_AS, so make sure it is defined
    before we try to use it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708666

 tests/pixbuf-randomly-modified.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/tests/pixbuf-randomly-modified.c b/tests/pixbuf-randomly-modified.c
index 2aa06ce..f03fb38 100644
--- a/tests/pixbuf-randomly-modified.c
+++ b/tests/pixbuf-randomly-modified.c
@@ -109,7 +109,9 @@ main (int argc, char **argv)
   max_mem_size.rlim_cur = 100 * 1024 * 1024; /* 100M */
   max_mem_size.rlim_max = max_mem_size.rlim_cur;
   setrlimit (RLIMIT_DATA, &max_mem_size);
+#if defined (RLIMIT_AS)
   setrlimit (RLIMIT_AS, &max_mem_size);
+#endif
 
   g_test_init (&argc, &argv, NULL);
 


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