Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/2] tools: Fix workaround to build with recent flex
@ 2012-07-29  6:30 Lucas De Marchi
  2012-07-29  6:30 ` [PATCH BlueZ 2/2] build-sys: Don't use -Werror for generated lexer.c Lucas De Marchi
  2012-07-29 16:31 ` [PATCH BlueZ 1/2] tools: Fix workaround to build with recent flex Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Lucas De Marchi @ 2012-07-29  6:30 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-29 16:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-29  6:30 [PATCH BlueZ 1/2] tools: Fix workaround to build with recent flex Lucas De Marchi
2012-07-29  6:30 ` [PATCH BlueZ 2/2] build-sys: Don't use -Werror for generated lexer.c Lucas De Marchi
2012-07-29 16:31 ` [PATCH BlueZ 1/2] tools: Fix workaround to build with recent flex Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox