diff options
author | Andrew Manison <amanison@anselsystems.com> | 2010-08-04 23:22:29 +0000 |
---|---|---|
committer | Andrew Manison <amanison@anselsystems.com> | 2010-08-04 23:22:29 +0000 |
commit | e692c6d8a84c2f8424704824ee5a1f09b6d31fee (patch) | |
tree | 48963a89a34ffac54a41caea12d4fdf0435e5e8e /testing/vlc/uclibc-inhibit-spawn.patch | |
parent | f3eb155dab5d8de075f99dee8bfe7a8bb750732c (diff) | |
parent | e5103dee420328c76983c537c09f956b7358af18 (diff) | |
download | aports-e692c6d8a84c2f8424704824ee5a1f09b6d31fee.tar.bz2 aports-e692c6d8a84c2f8424704824ee5a1f09b6d31fee.tar.xz |
Merge remote branch 'alpine/master'
Diffstat (limited to 'testing/vlc/uclibc-inhibit-spawn.patch')
-rw-r--r-- | testing/vlc/uclibc-inhibit-spawn.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/testing/vlc/uclibc-inhibit-spawn.patch b/testing/vlc/uclibc-inhibit-spawn.patch new file mode 100644 index 0000000000..9a6be5bd6a --- /dev/null +++ b/testing/vlc/uclibc-inhibit-spawn.patch @@ -0,0 +1,35 @@ +diff --git a/modules/misc/inhibit/xdg.c b/modules/misc/inhibit/xdg.c +index 01decac..134c5c9 100644 +--- a/modules/misc/inhibit/xdg.c ++++ b/modules/misc/inhibit/xdg.c +@@ -25,7 +25,12 @@ + #include <vlc_common.h> + #include <vlc_plugin.h> + #include <vlc_inhibit.h> +-#include <spawn.h> ++#if !defined(_POSIX_SPAWN) ++# define _POSIX_SPAWN -1 ++#else ++# include <spawn.h> ++#endif ++ + #include <sys/wait.h> + + static int Open (vlc_object_t *); +@@ -125,8 +130,15 @@ static void *Thread (void *data) + }; + pid_t pid; + int canc = vlc_savecancel (); +- ++#if (_POSIX_SPAWN >= 0) + if (!posix_spawnp (&pid, "xdg-screensaver", NULL, NULL, argv, environ)) ++#else ++ pid = fork(); ++ if (pid == 0) { ++ execvp("xdg-screensaver", argv); ++ exit(1); ++ } else if (pid > 0) ++#endif + { + int status; + |