buffindexed shmem.c patch
Julien ÉLIE
julien at trigofacile.com
Mon Jun 22 18:00:05 UTC 2015
Hi The Doctor,
> In some cases in buffindexed/shmem.c, the semaphore compile breaks
>
> Around line 268 please apply this:
>
> union semun s_u;
> s_u.val=0;
> if (semctl(this->semap, 0, IPC_RMID, s_u) < 0) {
> /*if (semctl(this->semap, 0, IPC_RMID, NULL) < 0) {*/
Well spotted, thanks!
Patch applied.
--- storage/buffindexed/shmem.c (révision 9902)
+++ storage/buffindexed/shmem.c (copie de travail)
@@ -265,9 +265,19 @@
else
debug("shmid %d deleted", this->shmid);
/* Delete the semaphore too */
+#ifdef HAVE_UNION_SEMUN
+ {
+ union semun semArg;
+ semArg.val = 0;
+ if (semctl(this->semap, 0, IPC_RMID, semArg) < 0) {
+ syswarn("can't remove semaphore %d", this->semap);
+ }
+ }
+#else
if (semctl(this->semap, 0, IPC_RMID, NULL) < 0) {
syswarn("can't remove semaphore %d", this->semap);
}
+#endif
}
free( this );
}
--
Julien ÉLIE
« Depuis que j'ai changé mon clavier qwerty pour un clavier azerty,
je tape deux fois plus vite.
Pourquoi ? Parce qu'un homme azerty en vaut deux ! »
More information about the inn-workers
mailing list