]> granicus.if.org Git - strace/commit
Fix ioctl entries on 32-bit architectures with 64-bit aligned structures
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 21 May 2015 16:19:40 +0000 (16:19 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 21 May 2015 22:53:42 +0000 (22:53 +0000)
commit8c20d8926c0ec14d2b08acdf775050d4d99210d3
tree4d1407419a25812a9ee9e619711d06802c397af4
parentf95cf995567f419663ec052d39aef268e078b97d
Fix ioctl entries on 32-bit architectures with 64-bit aligned structures

Some ioctl constants are defined to different values on those 32-bit
architectures where structures containing a 64-bit field are aligned on
a 8-byte boundary and have a size multiple of 8 bytes, and on other
32-bit architectures.

* configure.ac: Check the size of a structure containing a 64-bit field.
* linux/32/ioctls_inc.h: Rename to ...
* linux/32/ioctls_inc_align32.h: ... this.
* linux/32/ioctls_inc_align64.h: New file.
* linux/32/ioctls_inc.h: Include either 32/ioctls_inc_align32.h
or ioctls_inc_align64.h depending on SIZEOF_STRUCT_I64_I32.
* Makefile.am (EXTRA_DIST): Add linux/32/ioctls_inc_align32.h and
* linux/32/ioctls_inc_align64.h.
* tests/ioctl.c (main): Test for VIDIOC_ENUMINPUT.
* tests/ioctl.expected: Check VIDIOC_ENUMINPUT decoding.

Reported-by: Philippe De Muyter <phdm@macqel.be>
Makefile.am
configure.ac
linux/32/ioctls_inc.h
linux/32/ioctls_inc_align32.h [new file with mode: 0644]
linux/32/ioctls_inc_align64.h [new file with mode: 0644]
tests/ioctl.c
tests/ioctl.expected