From ae761cc4d7253b57f4c2cae784035b0a7c3b8e9f Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 26 Oct 2009 03:47:46 +0000 Subject: compatibility with linux --- 7seg.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/7seg.c b/7seg.c index 63be3cf..b9fb8e6 100644 --- a/7seg.c +++ b/7seg.c @@ -19,6 +19,11 @@ #include #include +#if defined(__linux__) +#define strlcpy(d,s,l) (strncpy(d,s,l), (d)[(l) - 1] = '\0') +#define strlcat(d,s,l) strncat(d,s,(l) - strlen(d) - 1) +#endif + char allowed[] = "0123456789:.-"; char *seg[][3] = { -- cgit v1.2.3