cpulimit: add missing includes

memchr and basename were implicitely declared

resolves #49270
This commit is contained in:
John 2024-03-13 15:47:19 +01:00
parent 5c47bfbff0
commit dc5ffcc0f1
4 changed files with 43 additions and 1 deletions

View file

@ -0,0 +1,10 @@
--- cpulimit-0.2/src/process_group.c 2015-06-17 08:46:59.000000000 +0200
+++ - 2024-03-13 15:45:05.747548361 +0100
@@ -26,6 +26,7 @@
#include <signal.h>
#include <assert.h>
+#include <libgen.h>
#include "process_iterator.h"
#include "process_group.h"

View file

@ -0,0 +1,10 @@
--- a/src/cpulimit.c 2015-06-17 08:46:59.000000000 +0200
+++ - 2024-03-13 16:03:55.061935534 +0100
@@ -27,6 +27,7 @@
*
*/
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

View file

@ -0,0 +1,22 @@
--- a/src/cpulimit.c 2024-03-13 15:50:04.331088508 +0100
+++ - 2024-03-13 15:54:07.537292811 +0100
@@ -43,7 +43,7 @@
#include <sys/types.h>
#include <sys/wait.h>
-#ifdef __APPLE__ || __FREEBSD__
+#if defined(__APPLE__) || defined(__FREEBSD__)
#include <libgen.h>
#endif
--- a/tests/process_iterator_test.c 2015-06-17 08:46:59.000000000 +0200
+++ - 2024-03-13 15:55:44.449780935 +0100
@@ -28,7 +28,7 @@
#include <signal.h>
#include <string.h>
-#ifdef __APPLE__ || __FREEBSD__
+#if defined(__APPLE__) || defined(__FREEBSD__)
#include <libgen.h>
#endif

View file

@ -1,7 +1,7 @@
# Template file for 'cpulimit'
pkgname=cpulimit
version=0.2
revision=3
revision=4
build_style=gnu-makefile
short_desc="Tool to limit the CPU usage of a process"
maintainer="Orphaned <orphan@voidlinux.org>"