[PATCH BlueZ 1/2] tools: Fix workaround to build with recent flex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Flex 2.5.36 no longer defines isatty(), resulting in the following build
error:

	tools/lexer.c:1402:9: error: implicit declaration of function
	‘isatty’ [-Werror=implicit-function-declaration]

Include the header unistd.h so we get the definition of that function
and at the same time keep the fix for older versions of flex, since this
header defines _UNISTD_H.
---
 tools/lexer.l | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/lexer.l b/tools/lexer.l
index ff9ce81..0d449ac 100644
--- a/tools/lexer.l
+++ b/tools/lexer.l
@@ -26,9 +26,7 @@
 #include <config.h>
 #endif
 
-/* Nasty workaround, but flex defines isatty() twice */
-#define _UNISTD_H
-
+#include <unistd.h>
 #include <stdio.h>
 #include <errno.h>
 #include <sys/socket.h>
-- 
1.7.11.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux