Ticket #3857 (closed defect: fixed)
makedev vs. sys/types.h warning
Reported by: | egmont | Owned by: | andrew_b |
---|---|---|---|
Priority: | minor | Milestone: | 4.8.21 |
Component: | mc-core | Version: | master |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master |
Description
Beginning with glibc-2.25, compilation gives these kinds of warnings:
parse_ls_vga.c:790:13: warning: In the GNU C Library, "makedev" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "makedev", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "makedev", you should undefine it after including <sys/types.h>. s->st_rdev = makedev (maj, min); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are a total of 10 of them, some with makedev(), some with major() or minor():
lib/vfs/parse_ls_vga.c:790 makedev()
src/filemanager/info.c:231 major() and minor()
src/filemanager/mountlist.c:751 makedev()
src/filemanager/panel.c:489-490 major() and minor()
src/vfs/cpio/cpio.c:741 and 748 makedev()
src/vfs/fish/fish.c:864 makedev()
src/vfs/tar/tar.c:429 makedev()
Attachments
Change History
comment:4 Changed 7 years ago by andrew_b
- Owner set to andrew_b
- Status changed from new to accepted
- Branch state changed from no branch to on review
- Milestone changed from Future Releases to 4.8.21
Branch: 3857_mekedev
changeset:30b6ed6b4ec7615a407bff0b33629c6171e4dc82
comment:5 Changed 7 years ago by andrew_b
- Votes for changeset set to andrew_b
- Branch state changed from on review to approved
comment:6 Changed 7 years ago by andrew_b
- Votes for changeset changed from andrew_b to committed-master
- Branch state changed from approved to merged
Merged to master: [17828095f10870b9b76f33f326ab2ea3c07f2c4e].
Note: See
TracTickets for help on using
tickets.
configure.ac contains AC_HEADER_MAJOR.
This, as far as I understand, expands based on the contents of /usr/share/autoconf to some stuff in configure which checks if these three functions are available in <sys/types.h>, and if they are, this is getting used. Otherwise MAJOR_IN_SYSMACROS would get defined in config.h (which would be what we need), but this way it doesn't.
So if glibc will remove these from <sys/types.h> I guess we'll still be fine, we'd automatically locate them in <sys/sysmacros.h>.
Not sure if we can do anything reasonable about the warning (some nasty-nasty workaround, sure). I guess it should be fixed in autoconf.
Autoconf's newest version (2.69) is 5+ years old, ouch.