diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-06-08 06:55:34 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-06-08 06:55:34 -0700 |
commit | 7008bf9175c57778894d72e751488968cdb3b180 (patch) | |
tree | 0a28a28b98b1daebe362bd4e0d261bafbe87b22e /sysif.c | |
parent | b3facf205e0276268e5e277d30d18a79ff824aee (diff) | |
download | txr-7008bf9175c57778894d72e751488968cdb3b180.tar.gz txr-7008bf9175c57778894d72e751488968cdb3b180.tar.bz2 txr-7008bf9175c57778894d72e751488968cdb3b180.zip |
sysif: work around glibc warnings about makedev macros.
The GNU C library is deprecating the practice of <sys/types.h>
defining the makedev, major and minor macros. A loud,
multi-line warning is issued for programs which include this
header and then use the macros. The new way is to rely on
the <sys/sysmacros.h> header instead. Of course, that might
not exist.
* configure (have_makedev): New variable. Upgrade the makedev
test to try it with <sys/sysmacros.h> first, then fall back
on <sys/types.h>. A new config macro HAVE_SYS_SYSMACROS_H
is created in config.h if sysmacros exists.
* sysif.c: If config.h defines HAVE_SYS_SYSMACROS_H to a
nonzero value, then include <sys/sysmacros.h>.
Diffstat (limited to 'sysif.c')
-rw-r--r-- | sysif.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -53,6 +53,9 @@ #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif +#if HAVE_SYS_SYSMACROS_H +#include <sys/sysmacros.h> +#endif #if HAVE_POLL #include <poll.h> #endif |