diff options
author | angelo <angelo@freebsd.(none)> | 2012-06-06 15:26:37 +0000 |
---|---|---|
committer | angelo <angelo@freebsd.(none)> | 2012-06-06 15:26:37 +0000 |
commit | ffcaeb2f05dea9a6387e1d24bc9671c1aa879964 (patch) | |
tree | 2d155f2ee779f95ef4ff3d7c94bbfeb6403d9972 /src | |
parent | 0ba6a181d84c196c9d9854ded7528baac66af461 (diff) | |
download | cpulimit-ffcaeb2f05dea9a6387e1d24bc9671c1aa879964.tar.gz |
fixed compilation on freebsd
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/cpulimit.c | 17 |
2 files changed, 1 insertions, 18 deletions
diff --git a/src/Makefile b/src/Makefile index 33c632d..6deb69b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,5 @@ CC?=gcc -CFLAGS?=-Wall -O2 +CFLAGS?=-Wall -O2 -D_GNU_SOURCE TARGETS=cpulimit LIBS=process.o procutils.o list.o diff --git a/src/cpulimit.c b/src/cpulimit.c index 300d320..6126c6b 100644 --- a/src/cpulimit.c +++ b/src/cpulimit.c @@ -99,23 +99,6 @@ int verbose = 0; //lazy mode (exits if there is no process) int lazy = 0; -static void *memrchr(const void *s, int c, size_t n) -{ - const unsigned char *start = (const unsigned char*)s; - const unsigned char *end = (const unsigned char*)s; - - end+=n-1; - - while(end>=start) { - if(*end==c) - return (void *)end; - else - end--; - } - - return NULL; -} - //SIGINT and SIGTERM signal handler static void quit(int sig) { |