[BRLTTY] makedev now in sysmacros.h
Mike Gorse
mgorse at alum.wpi.edu
Tue Mar 21 15:08:42 EDT 2017
Hi,
I apologize if someone already sent a patch like this, but I don't recall
seeing one.
Recent versions of glibc are generating a warning like this when brltty is
compiled:
./system_linux.c: In function 'openCharacterDevice':
./system_linux.c:809: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>.
if (mknod(path, mode, makedev(major, minor)) == -1) {
We now have the attached patch in openSUSE. sysmacros.h has existed at
least since glibc 2.11 (ie, since 2010 or earlier), so I think that the
patch is safe.
Thanks,
-Mike
-------------- next part --------------
--- a/Programs/system_linux.c
+++ b/Programs/system_linux.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <errno.h>
#include <fcntl.h>
+#include <sys/sysmacros.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <linux/major.h>
--- a/Programs/brlapi_client.c
+++ b/Programs/brlapi_client.c
@@ -27,6 +27,7 @@
#include <string.h>
#include <errno.h>
#include <fcntl.h>
+#include <sys/sysmacros.h>
#include <sys/stat.h>
#include <locale.h>
More information about the BRLTTY
mailing list