From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/daudio/, media-sound/daudio/files/
Date: Thu, 14 Jan 2016 00:47:59 +0000 (UTC) [thread overview]
Message-ID: <1452732472.edcdcd00ac0cf9a56faef2ceb75c2a82eed7f2b0.soap@gentoo> (raw)
commit: edcdcd00ac0cf9a56faef2ceb75c2a82eed7f2b0
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 14 00:47:19 2016 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Jan 14 00:47:52 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edcdcd00
media-sound/daudio: add -std=gnu89 to CFLAGS to restore pre-GCC5 semantics
Gentoo-Bug: 570582
In addition, modernize to EAPI=6 and fix implicit declarations.
Package-Manager: portage-2.2.26
media-sound/daudio/daudio-0.3-r1.ebuild | 45 ++++++++++
.../daudio-0.3-qa-implicit-declarations.patch | 98 ++++++++++++++++++++++
2 files changed, 143 insertions(+)
diff --git a/media-sound/daudio/daudio-0.3-r1.ebuild b/media-sound/daudio/daudio-0.3-r1.ebuild
new file mode 100644
index 0000000..2ff9aab
--- /dev/null
+++ b/media-sound/daudio/daudio-0.3-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Distributed audio on the local network"
+HOMEPAGE="http://daudio.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+#-sparc: 0.3: static audio on local daemon. No audio when client connects to amd64 daemon
+KEYWORDS="~amd64 ~ppc -sparc ~x86"
+
+IUSE=""
+DEPEND=">=media-libs/libmad-0.15.0b-r1"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-makefile.patch"
+ "${FILESDIR}/${P}-qa-implicit-declarations.patch"
+)
+
+src_prepare() {
+ # fix #570582 by restoring pre-GCC5 inline semantics
+ append-cflags -std=gnu89
+
+ tc-export CC
+ default
+}
+
+src_compile() {
+ emake -C client
+ emake -C server
+ emake -C streamer
+}
+
+src_install() {
+ dobin client/daudioc server/daudiod streamer/dstreamer
+ newinitd "${FILESDIR}"/daudio.rc daudio
+ dodoc doc/*
+}
diff --git a/media-sound/daudio/files/daudio-0.3-qa-implicit-declarations.patch b/media-sound/daudio/files/daudio-0.3-qa-implicit-declarations.patch
new file mode 100644
index 0000000..d60be6f
--- /dev/null
+++ b/media-sound/daudio/files/daudio-0.3-qa-implicit-declarations.patch
@@ -0,0 +1,98 @@
+Fix implicit declarations, such as:
+
+main.c: In function ‘main’:
+main.c:45:2: warning: incompatible implicit declaration of built-in function ‘exit’
+ exit(1);
+ ^
+--- daudio-0.3/client/main.c
++++ daudio-0.3/client/main.c
+@@ -22,6 +22,7 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <sched.h>
++#include <stdlib.h>
+
+ int main(int argc, char **argv) {
+ int s;
+@@ -50,7 +51,7 @@
+
+ /* drop priveledges */
+ uid = getuid();
+- seteuid(uid);
++ if(seteuid(uid)){};
+
+ set_default_options(void);
+
+--- daudio-0.3/client/net.c
++++ daudio-0.3/client/net.c
+@@ -27,6 +27,7 @@
+ #include <asm/unistd.h>
+ #include <mad.h>
+ #include <pthread.h>
++#include <stdlib.h>
+
+ #include "net.h"
+ #include "../common/frame.h"
+--- daudio-0.3/server/local.c
++++ daudio-0.3/server/local.c
+@@ -25,6 +25,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <netinet/in.h>
++#include <stdlib.h>
+
+ #include "timer.h"
+ #include "data.h"
+@@ -71,7 +72,7 @@
+
+ /* drop priveleges */
+ uid = getuid();
+- seteuid(uid);
++ if(seteuid(uid)){};
+
+ current = bigbuf.buffer;
+
+--- daudio-0.3/server/main.c
++++ daudio-0.3/server/main.c
+@@ -25,6 +25,7 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <signal.h>
++#include <stdlib.h>
+
+ int main () {
+ int r;
+@@ -40,19 +41,19 @@
+ uid = getuid();
+ r = d_init();
+ if(r == -1) {
+- seteuid(uid);
++ if(seteuid(uid)){};
+ perror("d_init failed");
+ exit(1);
+ }
+ r = b_init();
+ if(r == -1) {
+- seteuid(uid);
++ if(seteuid(uid)){};
+ perror("b_init failed");
+ exit(1);
+ }
+ r = t_init();
+ /* drop priveleges */
+- seteuid(uid);
++ if(seteuid(uid)){};
+ if(r == -1) {
+ perror("t_init failed");
+ exit(1);
+--- daudio-0.3/server/timer.c
++++ daudio-0.3/server/timer.c
+@@ -124,7 +124,7 @@
+
+ /* drop priveleges */
+ uid = getuid();
+- seteuid(uid);
++ if(seteuid(uid)){};
+
+ mytimer.it_value.tv_sec = 0;
+ mytimer.it_value.tv_usec = 0;
reply other threads:[~2016-01-14 0:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452732472.edcdcd00ac0cf9a56faef2ceb75c2a82eed7f2b0.soap@gentoo \
--to=soap@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox