[BRLTTY] Fwd: [patch] brltty-4.2 fails to compile with glibc-2.12

William Hubbs w.d.hubbs at gmail.com
Sun Oct 24 15:33:31 EDT 2010


----- Forwarded message from Samuli Suominen <ssuominen at gentoo.org> -----

Date: Wed, 06 Oct 2010 01:17:49 +0300
From: Samuli Suominen <ssuominen at gentoo.org>
To: BRLTTY at mielke.cc, williamh at gentoo.org
Subject: [patch] brltty-4.2 fails to compile with glibc-2.12

Due to headers cleanup in GLIBC 2.12 (and up), apps need to #include
stat.h on their own

(and with stat.h, you should also bring in types.h for certain other
libc's, such as Darwin's version or it will fail on other errors...
but if you only care of glibc, only stat.h is fine)

Original bug: http://bugs.gentoo.org/339846

Error:

make[2]: Entering directory
`/var/tmp/portage/app-accessibility/brltty-4.2/work/brltty-4.2/Drivers/Screen/Screen'
i686-pc-linux-gnu-gcc -Wall -O2 -pipe -I. -I. -I./../../../Programs
-I../../../Programs -I./../../.. -I../../..  -D_POSIX_C_SOURCE=2
-D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE
-DHAVE_CONFIG_H -fPIC '-DDRIVER_NAME=Screen' '-DDRIVER_CODE=sc'
'-DDRIVER_COMMENT=""' '-DDRIVER_VERSION=""' '-DDRIVER_DEVELOPERS=""' -c
./screen.c
host_sys_linux.o: In function `openCharacterDevice':
sys_linux.c:(.text+0x2348): undefined reference to `S_ISCHR'
collect2: ld returned 1 exit status
make[1]: *** [tbl2hex] Error 1

Patch:

--- Programs/sys_linux.c
+++ Programs/sys_linux.c
@@ -22,6 +22,8 @@
 #include <string.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <sys/types.h> /* sys/stat.h */
+#include <sys/stat.h> /* S_ISCHR */
 #include <sys/ioctl.h>
 #include <linux/kd.h>

----- End forwarded message -----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://mielke.cc/pipermail/brltty/attachments/20101024/81ad8e0a/attachment.sig>


More information about the BRLTTY mailing list