From 58115496628672e31a3c44b761f7526483154c2f Mon Sep 17 00:00:00 2001 From: Gabor Kovesdan Date: Tue, 19 Dec 2006 21:05:15 +0000 Subject: - Add OPTION to install as suid so that it can set realtime scheduling [1] - Install a desktop entry [1] - Move to LOCALBASE [1] - Makefile cleanups [1] - Add support for NOPORTDOCS - Bump PORTREVISION [1] PR: ports/106730 Submitted by: jylefort [1] Approved by: erwin (mentor) --- audio/gnuitar/files/patch-src_main.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 audio/gnuitar/files/patch-src_main.c (limited to 'audio/gnuitar/files') diff --git a/audio/gnuitar/files/patch-src_main.c b/audio/gnuitar/files/patch-src_main.c new file mode 100644 index 000000000000..b611da00e228 --- /dev/null +++ b/audio/gnuitar/files/patch-src_main.c @@ -0,0 +1,35 @@ +--- src/main.c.orig Fri Apr 15 16:37:41 2005 ++++ src/main.c Thu Dec 14 21:41:20 2006 +@@ -109,6 +109,9 @@ + #include + #include + ++#include ++#include ++ + #ifdef DEMO + #define DEMO_MSG "\n\nThis is the demo version of the GNUitar program." \ + "\nYou may download the full version as a source distribution" \ +@@ -953,9 +956,6 @@ + struct sched_param p; + + +- if ((error = init_sound()) != ERR_NOERROR) +- return error; +- + max_priority = sched_get_priority_max(SCHED_FIFO); + p.sched_priority = max_priority; + +@@ -964,6 +964,12 @@ + ("\nFailed to set scheduler priority. (Are you running as root?)"); + printf("\nContinuing with default priority"); + } ++ ++ setuid(getuid()); /* drop root privileges */ ++ ++ if ((error = init_sound()) != ERR_NOERROR) ++ return error; ++ + if (pthread_create(&audio_thread, NULL, audio_thread_start, NULL)) { + fprintf(stderr, "\nAudio thread creation failed!"); + return ERR_THREAD; -- cgit v1.2.3