File jack-shmat-check-fix.diff of Package jack
--- libjack/shm.c-dist 2008-10-13 13:09:03.000000000 +0200
+++ libjack/shm.c 2008-10-13 13:09:34.000000000 +0200
@@ -784,7 +784,7 @@ jack_access_registry (jack_shm_info_t *r
}
}
- if ((ri->attached_at = shmat (registry_id, 0, 0)) < 0) {
+ if ((ri->attached_at = shmat (registry_id, 0, 0)) == (void *)-1) {
jack_error ("cannot attach shm registry segment (%s)",
strerror (errno));
return EINVAL;
@@ -817,7 +817,7 @@ jack_create_registry (jack_shm_info_t *r
return errno;
}
- if ((ri->attached_at = shmat (registry_id, 0, 0)) < 0) {
+ if ((ri->attached_at = shmat (registry_id, 0, 0)) == (void *)-1) {
jack_error ("cannot attach shm registry segment (%s)",
strerror (errno));
return EINVAL;
@@ -888,7 +888,7 @@ int
jack_attach_shm (jack_shm_info_t* si)
{
if ((si->attached_at = shmat (jack_shm_registry[si->index].id,
- 0, 0)) < 0) {
+ 0, 0)) == (void *)-1) {
jack_error ("cannot attach shm segment (%s)",
strerror (errno));
jack_release_shm_info (si->index);