summaryrefslogtreecommitdiff
path: root/ext/sysvsem
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2002-03-28 07:36:02 +0000
committerDerick Rethans <derick@php.net>2002-03-28 07:36:02 +0000
commit803d2b3154272f956ab7ec386c2e68c4ffc45ea8 (patch)
treeddaa109fec4c93da94fabe42df7f1bff068e201c /ext/sysvsem
parent269bc38541dd423ef98f5b6df52b97c6264c68c2 (diff)
downloadphp-git-803d2b3154272f956ab7ec386c2e68c4ffc45ea8.tar.gz
- MFB
Diffstat (limited to 'ext/sysvsem')
-rw-r--r--ext/sysvsem/sysvsem.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c
index 3bfcca0a84..28b21df72b 100644
--- a/ext/sysvsem/sysvsem.c
+++ b/ext/sysvsem/sysvsem.c
@@ -411,7 +411,11 @@ PHP_FUNCTION(sem_remove)
RETURN_FALSE;
}
- if(semctl(sem_ptr->semid,NULL,IPC_RMID,NULL)<0) {
+#if HAVE_SEMUN
+ if(semctl(sem_ptr->semid,NULL,IPC_RMID,un)<0) {
+#else
+ if(semctl(sem_ptr->semid,NULL,IPC_RMID,NULL)<0) {
+#endif
php_error(E_WARNING, "sem_remove() failed for id %d: %s", id, strerror(errno));
RETURN_FALSE;
}