From 58504ecda814127cadfe7cb395d1e3274802caf4 Mon Sep 17 00:00:00 2001 From: anonymous Date: Mon, 19 Jan 2015 15:48:54 +0100 Subject: [PATCH] version away __unused1/2/3 for X86_64 Fixes Issue 14007 - shmctl with IPC_STAT returns wrong number of attachments. shmid_ds is defined wrong. Fix originally by tcak via Bugzilla. --- src/core/sys/posix/sys/shm.d | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/sys/posix/sys/shm.d b/src/core/sys/posix/sys/shm.d index 458a5e937cd..e42e437937d 100644 --- a/src/core/sys/posix/sys/shm.d +++ b/src/core/sys/posix/sys/shm.d @@ -60,16 +60,17 @@ version( linux ) alias c_ulong shmatt_t; + /* For any changes, please check /usr/include/bits/shm.h */ struct shmid_ds { ipc_perm shm_perm; size_t shm_segsz; time_t shm_atime; - c_ulong __unused1; + version( X86_64 ) {} else c_ulong __unused1; time_t shm_dtime; - c_ulong __unused2; + version( X86_64 ) {} else c_ulong __unused2; time_t shm_ctime; - c_ulong __unused3; + version( X86_64 ) {} else c_ulong __unused3; pid_t shm_cpid; pid_t shm_lpid; shmatt_t shm_nattch;