From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RO0Qo-0006kQ-V9 for garchives@archives.gentoo.org; Wed, 09 Nov 2011 05:10:39 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8416221C0A4; Wed, 9 Nov 2011 05:10:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5651E21C0A4 for ; Wed, 9 Nov 2011 05:10:28 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CA4371B401F for ; Wed, 9 Nov 2011 05:10:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id E31F380042 for ; Wed, 9 Nov 2011 05:10:26 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <16661d02e961f043b89eddd438b1b5dccca83f12.vapier@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/start-stop-daemon.c X-VCS-Directories: src/rc/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 16661d02e961f043b89eddd438b1b5dccca83f12 Date: Wed, 9 Nov 2011 05:10:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: cacd09a1-aed4-459c-b77a-ac852ccb3450 X-Archives-Hash: 1b0a03939becbb14fa9cf977e5a91179 commit: 16661d02e961f043b89eddd438b1b5dccca83f12 Author: Mike Frysinger gentoo org> AuthorDate: Wed Nov 9 05:09:58 2011 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Wed Nov 9 05:09:58 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D16661d02 ssd: fix building when SYS_ioprio_set is missing Older glibc's might not provide this. Signed-off-by: Mike Frysinger gentoo.org> --- src/rc/start-stop-daemon.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c index b6316ec..0078c3b 100644 --- a/src/rc/start-stop-daemon.c +++ b/src/rc/start-stop-daemon.c @@ -107,12 +107,17 @@ static char *changeuser, *ch_root, *ch_dir; =20 extern char **environ; =20 -#ifdef __linux__ +#if !defined(SYS_ioprio_set) && defined(__NR_ioprio_set) +# define SYS_ioprio_set __NR_ioprio_set +#endif static inline int ioprio_set(int which, int who, int ioprio) { +#ifdef SYS_ioprio_set return syscall(SYS_ioprio_set, which, who, ioprio); -} +#else + return 0; #endif +} =20 static void free_schedulelist(void) @@ -1150,13 +1155,10 @@ start_stop_daemon(int argc, char **argv) strerror(errno)); } =20 -/* Only linux suports setting an IO priority */ -#ifdef __linux__ if (ionicec !=3D -1 && ioprio_set(1, mypid, ionicec | ioniced) =3D=3D -1) eerrorx("%s: ioprio_set %d %d: %s", applet, ionicec, ioniced, strerror(errno)); -#endif =20 if (ch_root && chroot(ch_root) < 0) eerrorx("%s: chroot `%s': %s",