From ffcaeb2f05dea9a6387e1d24bc9671c1aa879964 Mon Sep 17 00:00:00 2001 From: angelo Date: Wed, 6 Jun 2012 15:26:37 +0000 Subject: fixed compilation on freebsd --- src/Makefile | 2 +- src/cpulimit.c | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3