Skip to content

Commit c1494b7

Browse files
committed
Provide MAP_FAILED if sys/mman.h doesn't.
On old HPUX this has to be #defined to -1. It might be that other values are required on other dinosaur systems, but we'll worry about that when and if we get reports.
1 parent 8f85667 commit c1494b7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/backend/port/sysv_shmem.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ typedef int IpcMemoryId; /* shared memory ID returned by shmget(2) */
5656

5757
#define PG_MMAP_FLAGS (MAP_SHARED|MAP_ANONYMOUS|MAP_HASSEMAPHORE)
5858

59+
/* Some really old systems don't define MAP_FAILED. */
60+
#ifndef MAP_FAILED
61+
#define MAP_FAILED ((void *) -1)
62+
#endif
63+
64+
5965
unsigned long UsedShmemSegID = 0;
6066
void *UsedShmemSegAddr = NULL;
6167
static Size AnonymousShmemSize;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy