packetstream: retry if sem_wait() fails

This is required for running glc-play on 64-bit SMP systems.

Found the solution by debugging and coincidence as it worked by slowing down
operations by running strace on glc-play. Tests showed that sem_wait() returns
-1 and errno is set to -EINTR. This means that sem_wait() is interrupted by
signals. It turned out that not more than 3 tries are required to finally
acquire the semaphore. We double this and use it as the maximum try count.

Signed-off-by: Sebastian Riemer <sebastian.riemer@gmx.de>
Merge pull request #3 from sriemer/master

[PATCH v2] packetstream: retry if sem_wait() fails