File tree Expand file tree Collapse file tree 2 files changed +8
-14
lines changed
compiler-rt/lib/sanitizer_common Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 2929#include < sys/mtio.h>
3030#include < sys/ptrace.h>
3131#include < sys/resource.h>
32+ #include < sys/shm.h>
3233#include < sys/signal.h>
3334#include < sys/socket.h>
3435#include < sys/sockio.h>
8788#include < wchar.h>
8889#include < wordexp.h>
8990
90- #define _KERNEL // to declare 'shminfo' structure
91- #include < sys/shm.h>
92- #undef _KERNEL
93-
9491#undef IOC_DIRMASK
9592
9693// Include these after system headers to avoid name clashes and ambiguities.
@@ -141,8 +138,6 @@ unsigned struct_timeb_sz = sizeof(struct timeb);
141138unsigned struct_msqid_ds_sz = sizeof (struct msqid_ds );
142139unsigned struct_mq_attr_sz = sizeof (struct mq_attr );
143140unsigned struct_statvfs_sz = sizeof (struct statvfs );
144- unsigned struct_shminfo_sz = sizeof (struct shminfo );
145- unsigned struct_shm_info_sz = sizeof (struct shm_info );
146141unsigned struct_regmatch_sz = sizeof (regmatch_t );
147142unsigned struct_regex_sz = sizeof (regex_t );
148143unsigned struct_fstab_sz = sizeof (struct fstab );
@@ -156,9 +151,6 @@ const uptr sig_err = (uptr)SIG_ERR;
156151const uptr sa_siginfo = (uptr)SA_SIGINFO;
157152
158153int shmctl_ipc_stat = (int )IPC_STAT;
159- int shmctl_ipc_info = (int )IPC_INFO;
160- int shmctl_shm_info = (int )SHM_INFO;
161- int shmctl_shm_stat = (int )SHM_STAT;
162154unsigned struct_utmpx_sz = sizeof (struct utmpx );
163155
164156int map_fixed = MAP_FIXED;
Original file line number Diff line number Diff line change @@ -419,12 +419,14 @@ struct __sanitizer_wordexp_t {
419419
420420typedef void __sanitizer_FILE;
421421
422- extern unsigned struct_shminfo_sz;
423- extern unsigned struct_shm_info_sz;
424422extern int shmctl_ipc_stat;
425- extern int shmctl_ipc_info;
426- extern int shmctl_shm_info;
427- extern int shmctl_shm_stat;
423+
424+ // This simplifies generic code
425+ #define struct_shminfo_sz -1
426+ #define struct_shm_info_sz -1
427+ #define shmctl_shm_stat -1
428+ #define shmctl_ipc_info -1
429+ #define shmctl_shm_info -1
428430
429431extern unsigned struct_utmpx_sz;
430432
You can’t perform that action at this time.
0 commit comments