[sysprof] libsysprof-capture: use sysconf() instead of getpagesize()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] libsysprof-capture: use sysconf() instead of getpagesize()
- Date: Thu, 13 Feb 2020 22:33:18 +0000 (UTC)
commit 19e077736be5722955a30de4d2fe014f3d69802a
Author: Christian Hergert <chergert redhat com>
Date: Thu Feb 13 14:29:35 2020 -0800
libsysprof-capture: use sysconf() instead of getpagesize()
src/libsysprof-capture/sysprof-capture-util.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/libsysprof-capture/sysprof-capture-util.c b/src/libsysprof-capture/sysprof-capture-util.c
index cf81c49..58336e7 100644
--- a/src/libsysprof-capture/sysprof-capture-util.c
+++ b/src/libsysprof-capture/sysprof-capture-util.c
@@ -60,6 +60,7 @@
#include <errno.h>
#include <glib.h>
+#include <unistd.h>
#ifdef G_OS_WIN32
# include <process.h>
@@ -85,7 +86,7 @@ size_t
GetSystemInfo (&system_info);
pgsz = system_info.dwPageSize;
#else
- pgsz = getpagesize ();
+ pgsz = sysconf (_SC_PAGESIZE);
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]