sys-process/time: fix implicit function declaration

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2022-09-10 14:17:39 +01:00
parent 33bd8437e8
commit 819911bb27
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
https://lists.gnu.org/archive/html/bug-time/2022-08/msg00001.html
From c8deae54f92d636878097063b411af9fb5262ad3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 15 Aug 2022 07:24:24 -0700
Subject: [PATCH] include string.h for memset()
Fixes implicit function declaration warning e.g.
resuse.c:103:3: error: call to undeclared library function 'memset' with type 'void *(void *, int, unsigned long)'
Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-time/2022-08/msg00001.html]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/src/resuse.c
+++ b/src/resuse.c
@@ -22,6 +22,7 @@
*/
#include "config.h"
+#include <string.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/resource.h>

View File

@@ -0,0 +1,18 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Displays info about resources used by a program"
HOMEPAGE="https://www.gnu.org/directory/time.html"
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
BDEPEND="sys-apps/texinfo"
PATCHES=(
"${FILESDIR}"/${PN}-1.9-implicit-func-decl-clang.patch
)