From: Robert Spalek Date: Fri, 24 Oct 2008 07:32:40 +0000 (-0700) Subject: ucw/semaphore.h doesn't compile with gcc-4.0; the fix is trivial X-Git-Tag: holmes-import~244 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=bef229da179afb9a33dbee64d670a99e7696bc18;p=libucw.git ucw/semaphore.h doesn't compile with gcc-4.0; the fix is trivial --- diff --git a/ucw/semaphore.h b/ucw/semaphore.h index 140ba9b9..a2bc8959 100644 --- a/ucw/semaphore.h +++ b/ucw/semaphore.h @@ -28,10 +28,11 @@ sem_alloc(void) { char buf[TEMP_FILE_NAME_LEN]; int mode, retry = 10; + sem_t *sem; do { temp_file_name(buf, &mode); - sem_t *sem = sem_open(buf, mode | O_CREAT, 0777, 0); + sem = sem_open(buf, mode | O_CREAT, 0777, 0); } while (sem == (sem_t*) SEM_FAILED && errno == EEXIST && retry --); ASSERT(sem != (sem_t*) SEM_FAILED);