summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-01-08 19:39:18 -0500
committerRich Felker <dalias@aerifal.cx>2014-01-08 19:39:18 -0500
commit513136efa4274c39ed1c071ae4f4f2b10118f9f5 (patch)
tree1c6d9bd1e98247d5546ee1ac8ee45e95c0bccb81 /include
parenta1527a0c3ed72df3c1a22f774c8618a486b87b94 (diff)
downloadmusl-513136efa4274c39ed1c071ae4f4f2b10118f9f5.tar.gz
fix namespace violation in sys/shm.h
in fixing this, I've changed the logic from ugly #if/#else blocks inside the struct shm_info definition to a fixed struct definition and optional macros to rename the elements. this will be helpful if we need to move shm_info to a bits header in the future, as it will keep the feature test logic out of bits.
Diffstat (limited to 'include')
-rw-r--r--include/sys/shm.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/sys/shm.h b/include/sys/shm.h
index c20f0334..d97e582c 100644
--- a/include/sys/shm.h
+++ b/include/sys/shm.h
@@ -37,14 +37,16 @@ struct shminfo {
unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
};
-struct shm_info {
- int used_ids;
- unsigned long shm_tot, shm_rss, shm_swp;
#ifdef _GNU_SOURCE
- unsigned long swap_attempts, swap_successes;
-#else
- unsigned long __reserved[2];
+#define __used_ids used_ids
+#define __swap_attempts swap_attempts
+#define __swap_successes swap_successes
#endif
+
+struct shm_info {
+ int __used_ids;
+ unsigned long shm_tot, shm_rss, shm_swp;
+ unsigned long __swap_attempts, __swap_successes;
};
typedef unsigned long shmatt_t;