Skip to content

Conversation

@heat1024
Copy link

This PR fix some mode type to C.__mode_t from C.ushort.

Because some OS version got diffrente type of ipc_perm.mode.

for example, I got error like this on previous master version

/go/pkg/mod/github.com/teepark/[email protected]/msg.go:101:4: cannot use _Ctype_ushort(mqi.Perms.Mode & 511) (type _Ctype_ushort) as type _Ctype_uint in field value
/go/pkg/mod/github.com/teepark/[email protected]/sem.go:186:4: cannot use _Ctype_ushort(ssi.Perms.Mode & 511) (type _Ctype_ushort) as type _Ctype_uint in field value
/go/pkg/mod/github.com/teepark/[email protected]/shm.go:85:4: cannot use _Ctype_ushort(info.Perms.Mode & 511) (type _Ctype_ushort) as type _Ctype_uint in field value

The error occurs because, the OS of golang:latest container's ipc_perm.mode is uint but current code is specified by ushort.

So, for OS type-specific flexibility, I think it shoud use the __mode_t type.

@heat1024 heat1024 changed the title ipc_perm struct's mode type Make flexibility about ipc_perm.mode's type by each OS Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant