add O_NOCTTY

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2471 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2008-05-21 22:42:01 +00:00
parent a9c80b4383
commit 9303cdd732

View file

@ -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;