From: john.levon@sun.com Subject: [PATCH] Fix ioemu compile on Solaris Date: Mon, 01 Oct 2007 16:09:17 -0700 Message-ID: <0cbf552e2140e1f42390.1191280157@hatchback> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User john.levon@sun.com # 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. Signed-off-by: John Levon diff --git a/tools/ioemu/vl.c b/tools/ioemu/vl.c --- a/tools/ioemu/vl.c +++ b/tools/ioemu/vl.c @@ -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