Use the /proc way for counting host cores on Cygwin.

This commit is contained in:
pooka 2013-01-14 21:04:15 +00:00
parent e0f5e00388
commit 4adce8f663
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rumpuser.c,v 1.27 2013/01/10 19:14:12 pooka Exp $ */
/* $NetBSD: rumpuser.c,v 1.28 2013/01/14 21:04:15 pooka Exp $ */
/*
* Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved.
@ -28,7 +28,7 @@
#include "rumpuser_port.h"
#if !defined(lint)
__RCSID("$NetBSD: rumpuser.c,v 1.27 2013/01/10 19:14:12 pooka Exp $");
__RCSID("$NetBSD: rumpuser.c,v 1.28 2013/01/14 21:04:15 pooka Exp $");
#endif /* !lint */
#include <sys/ioctl.h>
@ -765,7 +765,7 @@ rumpuser_getnhostcpu(void)
size_t sz = sizeof(ncpu);
sysctlbyname("hw.ncpu", &ncpu, &sz, NULL, 0);
#elif __linux__
#elif defined(__linux__) || defined(__CYGWIN__)
FILE *fp;
char *line = NULL;
size_t n = 0;