Skip to contentSkip to conversation

Fix ioemu compile on Solaris

PATCH New [email protected] 1 participant 1 message Oct 1, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix ioemu compile on Solaris

# HG changeset patch
# User [email protected]
# Date 1191280054 25200
# Node ID 0cbf552e2140e1f4239057149258a9cd59233b5d # Parent 778cf70a1378dd640c569749a2c01854f46d6ed3 Fix ioemu compile on Solaris

Solaris doesn't have RLIMIT_RSS at least; don't try to set rlimits on Solaris.

tools/ioemu/vl.c +2 -0
@@ -7356,6 +7356,7 @@ int main(int argc, char **argv)
     char qemu_dm_logfilename[128];
     const char *direct_pci = NULL;
 
+#ifndef __sun__
     /* Maximise rlimits. Needed where default constraints are tight (*BSD). */
     if (getrlimit(RLIMIT_STACK, &rl) != 0) {
        perror("getrlimit(RLIMIT_STACK)");
@@ -7379,6 +7380,7 @@ int main(int argc, char **argv)
     rl.rlim_max = RLIM_INFINITY;
     if (setrlimit(RLIMIT_MEMLOCK, &rl) != 0)
        perror("setrlimit(RLIMIT_MEMLOCK)");
+#endif
 
     /* Ensure that SIGUSR2 is blocked by default when a new thread is created,
        then only the threads that use the signal unblock it -- this fixes a