tags 552853 + patch
retitle 552853 chise-base: [PATCH] FTBFS: sysdep.h:15: error: conflicting types 
for 'strnlen'
thanks

Here is patch to fix the cimpiling issues.

Jari

>From 96ed5938f59855e888dec9ba21181bb1e276cef8 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aa...@cante.net>
Date: Sat, 16 Jan 2010 18:37:46 +0200
Subject: [PATCH] Gcc 4.4 compile fix strlen()

Signed-off-by: Jari Aalto <jari.aa...@cante.net>
---
 debian/rules     |    4 ++--
 libchise/chise.c |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index a99d61f..e1104b9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,8 +12,8 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-
-CFLAGS = -Wall -g
+DEFS   = -DHAVE_STRNLEN
+CFLAGS = -Wall -g $(DEFS)
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0
diff --git a/libchise/chise.c b/libchise/chise.c
index 53e4293..07eabe8 100644
--- a/libchise/chise.c
+++ b/libchise/chise.c
@@ -16,6 +16,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <string.h>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-- 
1.6.5

Reply via email to