Ticket #817: hurd.patch
| File hurd.patch, 4.6 KB (added by pino, 6 months ago) |
|---|
-
src/pulse/context.c
a b 660 660 goto fail; 661 661 } 662 662 663 if ((sa.sa_flags & SA_NOCLDWAIT) || sa.sa_handler == SIG_IGN) { 663 if ( 664 #ifdef SA_NOCLDWAIT 665 (sa.sa_flags & SA_NOCLDWAIT) || 666 #endif 667 sa.sa_handler == SIG_IGN) { 664 668 pa_log_debug("Process disabled waitpid(), cannot autospawn."); 665 669 pa_context_fail(c, PA_ERR_CONNECTIONREFUSED); 666 670 goto fail; -
src/pulsecore/mutex-posix.c
a b 50 50 pa_assert_se(pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) == 0); 51 51 52 52 #ifdef HAVE_PTHREAD_PRIO_INHERIT 53 if (inherit_priority) 54 pa_assert_se(pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT) == 0); 53 if (inherit_priority) { 54 r = pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT); 55 pa_assert_se(r == 0 || r == ENOTSUP); 56 } 55 57 #endif 56 58 57 59 m = pa_xnew(pa_mutex, 1); -
src/modules/rtp/rtp.c
a b 278 278 } 279 279 280 280 for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm)) 281 if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == S O_TIMESTAMP) {281 if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_TIMESTAMP) { 282 282 memcpy(tstamp, CMSG_DATA(cm), sizeof(struct timeval)); 283 283 found_tstamp = TRUE; 284 284 break; -
src/modules/rtp/module-rtp-recv.c
a b 428 428 429 429 pa_make_udp_socket_low_delay(fd); 430 430 431 #ifdef SO_TIMESTAMP 431 432 one = 1; 432 433 if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMP, &one, sizeof(one)) < 0) { 433 434 pa_log("SO_TIMESTAMP failed: %s", pa_cstrerror(errno)); 434 435 goto fail; 435 436 } 437 #else 438 goto fail; 439 #endif 436 440 437 441 one = 1; 438 442 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) { -
src/modules/module-pipe-source.c
a b 286 286 287 287 pa_source_set_asyncmsgq(u->source, u->thread_mq.inq); 288 288 pa_source_set_rtpoll(u->source, u->rtpoll); 289 pa_source_set_fixed_latency(u->source, pa_bytes_to_usec( PIPE_BUF, &u->source->sample_spec));289 pa_source_set_fixed_latency(u->source, pa_bytes_to_usec(pa_pipe_buf(u->fd), &u->source->sample_spec)); 290 290 291 291 u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1); 292 292 pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL); -
src/utils/pacmd.c
a b 47 47 int fd = -1; 48 48 int ret = 1, i; 49 49 struct sockaddr_un sa; 50 char ibuf[PIPE_BUF], obuf[PIPE_BUF]; 51 size_t ibuf_index, ibuf_length, obuf_index, obuf_length; 50 char *ibuf = NULL; 51 char *obuf = NULL; 52 size_t ibuf_size, ibuf_index, ibuf_length, obuf_size, obuf_index, obuf_length; 52 53 char *cli; 53 54 pa_bool_t ibuf_eof, obuf_eof, ibuf_closed, obuf_closed; 54 55 struct pollfd pollfd[3]; … … 102 103 goto fail; 103 104 } 104 105 106 i = pa_pipe_buf(fd); 107 ibuf_size = PA_MIN(i, pa_pipe_buf(STDIN_FILENO)); 108 ibuf = pa_xmalloc(ibuf_size); 109 obuf_size = PA_MIN(i, pa_pipe_buf(STDOUT_FILENO)); 110 obuf = pa_xmalloc(obuf_size); 105 111 ibuf_index = ibuf_length = obuf_index = obuf_length = 0; 106 112 ibuf_eof = obuf_eof = ibuf_closed = obuf_closed = FALSE; 107 113 … … 109 115 for (i = 1; i < argc; i++) { 110 116 size_t k; 111 117 112 k = PA_MIN( sizeof(ibuf)- ibuf_length, strlen(argv[i]));118 k = PA_MIN(ibuf_size - ibuf_length, strlen(argv[i])); 113 119 memcpy(ibuf + ibuf_length, argv[i], k); 114 120 ibuf_length += k; 115 121 116 if (ibuf_length < sizeof(ibuf)) {122 if (ibuf_length < ibuf_size) { 117 123 ibuf[ibuf_length] = i < argc-1 ? ' ' : '\n'; 118 124 ibuf_length++; 119 125 } … … 182 188 ssize_t r; 183 189 pa_assert(ibuf_length <= 0); 184 190 185 if ((r = pa_read(STDIN_FILENO, ibuf, sizeof(ibuf), &stdin_type)) <= 0) {191 if ((r = pa_read(STDIN_FILENO, ibuf, ibuf_size, &stdin_type)) <= 0) { 186 192 if (r < 0) { 187 193 pa_log(_("read(): %s"), strerror(errno)); 188 194 goto fail; … … 202 208 ssize_t r; 203 209 pa_assert(obuf_length <= 0); 204 210 205 if ((r = pa_read(fd, obuf, sizeof(obuf), &fd_type)) <= 0) {211 if ((r = pa_read(fd, obuf, obuf_size, &fd_type)) <= 0) { 206 212 if (r < 0) { 207 213 pa_log(_("read(): %s"), strerror(errno)); 208 214 goto fail; … … 260 266 if (fd >= 0) 261 267 pa_close(fd); 262 268 269 pa_xfree(obuf); 270 pa_xfree(ibuf); 271 263 272 return ret; 264 273 }
