$OpenBSD$

Index: runtime/druntime/src/core/sys/posix/sys/shm.d
--- runtime/druntime/src/core/sys/posix/sys/shm.d.orig
+++ runtime/druntime/src/core/sys/posix/sys/shm.d
@@ -121,6 +121,38 @@ else version( FreeBSD )
     int   shmdt(in void*);
     int   shmget(key_t, size_t, int);
 }
+else version(OpenBSD)
+{
+    // get the _MAX_PAGE_SHIFT for the SHMLBA assignment
+    import core.sys.openbsd.sys.types : _MAX_PAGE_SHIFT;
+
+    enum SHM_RDONLY     = 0x01000; // 010000
+    enum SHM_RND        = 0x02000; // 020000
+    enum SHMLBA         = 1 << _MAX_PAGE_SHIFT; 
+
+    alias short         shmatt_t;
+
+    struct shmid_ds
+    {
+         ipc_perm       shm_perm;
+         int            shm_segsz;
+         pid_t          shm_lpid;
+         pid_t          shm_cpid;
+         shmatt_t       shm_nattch;
+         time_t         shm_atime;
+         long           __shm_atimensec;
+         time_t         shm_dtime;
+         long           __shm_dtimensec;
+         time_t         shm_ctime;
+         long           __shm_ctimensec;
+         void*          shm_internal;
+    }
+
+    void* shmat(int, in void*, int);
+    int   shmctl(int, int, shmid_ds*);
+    int   shmdt(in void*);
+    int   shmget(key_t, size_t, int);
+}
 else version( DragonFlyBSD )
 {
     enum SHM_RDONLY     = 0x01000; // 010000
