diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c
index 915b49c80649c3938a159c6b37db69bc9ae5aff9..ca1f34a28c8678ae1941cd3963396eae8c44239a 100644
--- a/src/backend/port/sysv_shmem.c
+++ b/src/backend/port/sysv_shmem.c
@@ -10,7 +10,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/backend/port/sysv_shmem.c,v 1.37 2004/09/10 14:24:25 momjian Exp $
+ *	  $PostgreSQL: pgsql/src/backend/port/sysv_shmem.c,v 1.38 2004/09/24 05:27:35 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -412,7 +412,7 @@ PGSharedMemoryAttach(IpcMemoryKey key, IpcMemoryId *shmid)
 
 	if (hdr->magic != PGShmemMagic)
 	{
-		shmdt(hdr);
+		shmdt((void *) hdr);
 		return NULL;			/* segment belongs to a non-Postgres app */
 	}