diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2021-02-06 15:24:29 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2021-02-06 15:24:29 +0500 |
commit | b1ad6a35a605e9491b8492b5af525994d189d09e (patch) | |
tree | c6e0c4c66ec05232404627b3a008b620863adf1a /accel-pppd | |
parent | 87f24b5e4585bb6308ce1779b966fbb52e59ebae (diff) | |
download | accel-ppp-b1ad6a35a605e9491b8492b5af525994d189d09e.tar.gz accel-ppp-b1ad6a35a605e9491b8492b5af525994d189d09e.zip |
fix build with non-portable _SC_PAGE_SIZE
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/cli/std_cmd.c | 2 | ||||
-rw-r--r-- | accel-pppd/extra/net-snmp/statCore.c | 3 | ||||
-rw-r--r-- | accel-pppd/main.c | 2 | ||||
-rw-r--r-- | accel-pppd/triton/mempool.c | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/accel-pppd/cli/std_cmd.c b/accel-pppd/cli/std_cmd.c index 500102b..e752918 100644 --- a/accel-pppd/cli/std_cmd.c +++ b/accel-pppd/cli/std_cmd.c @@ -25,7 +25,7 @@ static int show_stat_exec(const char *cmd, char * const *fields, int fields_cnt, char statm_fname[128]; FILE *f; unsigned long vmsize = 0, vmrss = 0; - unsigned long page_size_kb = sysconf(_SC_PAGE_SIZE) / 1024; + unsigned long page_size_kb = sysconf(_SC_PAGESIZE) / 1024; #ifdef MEMDEBUG struct mallinfo mi = mallinfo(); #endif diff --git a/accel-pppd/extra/net-snmp/statCore.c b/accel-pppd/extra/net-snmp/statCore.c index 55109f6..c2e6468 100644 --- a/accel-pppd/extra/net-snmp/statCore.c +++ b/accel-pppd/extra/net-snmp/statCore.c @@ -3,6 +3,7 @@ * : mib2c.scalar.conf 11805 2005-01-07 09:37:18Z dts12 $ */ +#include <unistd.h> #include <time.h> #include <net-snmp/net-snmp-config.h> @@ -111,7 +112,7 @@ handle_statCoreMemRss(netsnmp_mib_handler *handler, char statm_fname[128]; FILE *f; unsigned long vmsize = 0, vmrss = 0; - unsigned long page_size = sysconf(_SC_PAGE_SIZE); + unsigned long page_size = sysconf(_SC_PAGESIZE); sprintf(statm_fname, "/proc/%i/statm", getpid()); f = fopen(statm_fname, "r"); diff --git a/accel-pppd/main.c b/accel-pppd/main.c index 03fac61..08ab409 100644 --- a/accel-pppd/main.c +++ b/accel-pppd/main.c @@ -291,7 +291,7 @@ int main(int _argc, char **_argv) int c, sig, goto_daemon = 0, len; pid_t pid = 0; struct sigaction sa; - int pagesize = sysconf(_SC_PAGE_SIZE); + int pagesize = sysconf(_SC_PAGESIZE); char *dump = NULL; int internal = 0; int no_sigint = 0; diff --git a/accel-pppd/triton/mempool.c b/accel-pppd/triton/mempool.c index ac444c5..923119a 100644 --- a/accel-pppd/triton/mempool.c +++ b/accel-pppd/triton/mempool.c @@ -255,7 +255,7 @@ static void sigclean(int num) static int mmap_grow(void) { - int size = sysconf(_SC_PAGE_SIZE) * (1 << PAGE_ORDER); + int size = sysconf(_SC_PAGESIZE) * (1 << PAGE_ORDER); void *ptr; if (mmap_endptr) { |