Ticket #817 (new enhancement)

Opened 21 months ago

Last modified 3 months ago

Does not compile on GNU/Hurd

Reported by: pino Owned by: lennart
Milestone: Component: daemon
Keywords: Cc:

Description

pulseaudio 0.9.21 does not compile on GNU/Hurd yet. Below there is a list of the various problems and eventual solutions found:

- src/pulse/context.c: usage of SA_NOCLDWAIT

sigaction(2) shows it is Linux-only, and waitpid(2) says that checking for the presence of that flag and checking that the handler is SIG_IGN is equivalent; thus, make the SA_NOCLDWAIT flag check optionally compiled depending on the SA_NOCLDWAIT presence

- src/pulsecore/memtrap.c: SA_SIGINFO

the first step is using a simple sa_handler if SA_SIGINFO is not defined; futhermore, PA remaps memory in the SIGBUS signal handler, using the data provided in the siginfo_t, so just fail in the simple signal handler (as there's no memory remap job possible)

- src/modules/rtp/module-rtp-recv.c: SO_TIMESTAMP

Hurd does not support activating the timestamp receiving for sockets, so enable it only if SO_TIMESTAMP is defined

- src/modules/rtp/rtp.c: SO_TIMESTAMP

most probably the right type to check should be SCM_TIMESTAMP, like other types available for cmsg_type (eg SCM_RIGHTS)

- src/modules/module-pipe-source.c: PIPE_BUF

make use of the available pa_pipe_buf() for the job, hopefully with the correct fd

- src/utils/pacmd.c: PIPE_BUF

here the two 'ibuf' and 'obuf' are dynamically allocated with the minimum size of all the pipe_buf for the fd's they are used as buffer when reading from and writing to

- src/pulsecore/mutex-posix.c: runtime assert() failing

pa_mutex_new asserts on setting the PRIO_INHERIT on the mutex attributes, but this is not implemented on Hurd yet; although, given few lines below the code gracefully handles such case, then make that pthread_mutexattr_setprotocol() do that as well

The attached patch was produced against a 0.9.21 tree.

Attachments

hurd.patch (4.6 kB) - added by pino 3 months ago.
Hurd fixes for PulseAudio 1.1

Change History

Changed 9 months ago by pino

Any news about this patch? Most probably some of the parts are not that "beautiful", but IMHO most of the patch could be applied. Also, having a review of the non-upstream-able parts would be nice, so we can just apply them to the Debian/Hurd packaging.

Changed 3 months ago by pino

Hurd fixes for PulseAudio 1.1

Changed 3 months ago by pino

I just attached an updated patch, based on PA 1.1.

- src/pulsecore/memtrap.c: SA_SIGINFO

Support for SA_SIGINFO has been started, so this part is no more needed.

- src/modules/rtp/module-rtp-recv.c: SO_TIMESTAMP

I slightly changed this part to always fail at runtime.

Still, having a review of the various parts would be nice...

Thanks.

Note: See TracTickets for help on using tickets.