File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11include (CheckIncludeFiles )
2+ include (CheckFunctionExists )
23
34add_library (psl-native SHARED
45 getstat.cpp
@@ -28,8 +29,10 @@ add_library(psl-native SHARED
2829 createprocess.cpp
2930 nativesyslog.cpp )
3031
32+ check_function_exists (sysconf HAVE_SYSCONF )
33+
3134check_include_files (
32- "sys/types.h;sys/ sysctl.h"
35+ "sys/sysctl.h"
3336 HAVE_SYS_SYSCTL_H )
3437
3538configure_file (
Original file line number Diff line number Diff line change 77#include < sys/user.h>
88#include < sys/param.h>
99
10- #if HAVE_SYS_SYSCTL_H
10+ #if HAVE_SYSCONF
11+ // do nothing
12+ #elif HAVE_SYS_SYSCTL_H
1113#include < sys/sysctl.h>
1214#endif
1315
Original file line number Diff line number Diff line change 1111#include < sstream>
1212#include < errno.h>
1313
14- #if HAVE_SYS_SYSCTL_H
14+ #if __APPLE__
15+ #include < sys/sysctl.h>
16+ #elif HAVE_SYSCONF
17+ // do nothing
18+ #elif HAVE_SYS_SYSCTL_H
1519#include < sys/sysctl.h>
1620#endif
1721
Original file line number Diff line number Diff line change 11#pragma once
22
33#cmakedefine01 HAVE_SYS_SYSCTL_H
4+ #cmakedefine01 HAVE_SYSCONF
You can’t perform that action at this time.
0 commit comments