summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/random.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-05-21 22:42:01 +0000
committerLennart Poettering <lennart@poettering.net>2008-05-21 22:42:01 +0000
commit9303cdd732e06063382fcc01ae0f7b95278fbba2 (patch)
treeb17f8cb0c55c8bae90e2eb72c62775d67229ab4f /src/pulsecore/random.c
parenta9c80b43831411fac4071ea1cb3e23bd42e6bd9d (diff)
add O_NOCTTY
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2471 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/random.c')
-rw-r--r--src/pulsecore/random.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pulsecore/random.c b/src/pulsecore/random.c
index 87afebfa..6fe649c5 100644
--- a/src/pulsecore/random.c
+++ b/src/pulsecore/random.c
@@ -64,7 +64,11 @@ static int random_proper(void *ret_data, size_t length) {
while (*device) {
ret = 0;
- if ((fd = open(*device, O_RDONLY)) >= 0) {
+ if ((fd = open(*device, O_RDONLY
+#ifdef O_NOCTTY
+ | O_NOCTTY
+#endif
+ )) >= 0) {
if ((r = pa_loop_read(fd, ret_data, length, NULL)) < 0 || (size_t) r != length)
ret = -1;