From ffd1eb1875a66c28b370c75a27d56e6d047c9860 Mon Sep 17 00:00:00 2001 From: Roel Verdult Date: Sat, 5 Feb 2011 20:52:55 +0000 Subject: [PATCH] falling back to POSIX compatible commands, fgets in stead of getline. MacOSX / BSD doesn't come with glibc on default --- examples/pn53x-tamashell.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/pn53x-tamashell.c b/examples/pn53x-tamashell.c index 5ec7c19..a9dbb61 100644 --- a/examples/pn53x-tamashell.c +++ b/examples/pn53x-tamashell.c @@ -107,10 +107,11 @@ int main(int argc, const char* argv[]) size_t n; int s; if (input != NULL) { - s = getline(&cmd, &n, input); + fgets(cmd, n, input); } else { - s = getline(&cmd, &n, stdin); + fgets(cmd, n, stdin); } + s = strlen(cmd); if (s <= 0) { printf("Bye!\n"); free(cmd);