[totem] main: comment out set_resource_limits on non-Unix
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: comment out set_resource_limits on non-Unix
- Date: Thu, 29 Mar 2012 14:08:43 +0000 (UTC)
commit 246e7684f1a8adfb68e01c4991d59efd11331e3c
Author: Shixin Zeng <zeng shixin gmail com>
Date: Sat Feb 21 02:10:45 2009 -0600
main: comment out set_resource_limits on non-Unix
https://bugzilla.gnome.org/show_bug.cgi?id=342926
src/totem-resources.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/totem-resources.c b/src/totem-resources.c
index ceebdeb..78c2802 100644
--- a/src/totem-resources.c
+++ b/src/totem-resources.c
@@ -34,7 +34,10 @@
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
+
+#ifdef G_OS_UNIX
#include <sys/resource.h>
+#endif
#include "totem-resources.h"
@@ -48,6 +51,7 @@ static gboolean finished = TRUE;
static void
set_resource_limits (const char *input)
{
+#ifdef G_OS_UNIX
struct rlimit limit;
struct stat buf;
rlim_t max;
@@ -77,6 +81,9 @@ set_resource_limits (const char *input)
limit.rlim_cur = MAX_HELPER_SECONDS;
limit.rlim_max = MAX_HELPER_SECONDS;
setrlimit (RLIMIT_CPU, &limit);
+#else
+#warning unimplemented
+#endif
}
G_GNUC_NORETURN static gpointer
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]