Revision: 149804 https://trac.macports.org/changeset/149804 Author: jmr@macports.org Date: 2016-06-30 02:13:33 -0700 (Thu, 30 Jun 2016) Log Message: ----------- fix Modified Paths: -------------- trunk/dports/devel/libedit/files/getline.c Modified: trunk/dports/devel/libedit/files/getline.c =================================================================== --- trunk/dports/devel/libedit/files/getline.c 2016-06-30 09:02:15 UTC (rev 149803) +++ trunk/dports/devel/libedit/files/getline.c 2016-06-30 09:13:33 UTC (rev 149804) @@ -1,10 +1,14 @@ /* CC0, from https://github.com/digilus/getline */ +#include "config.h" + +#if !HAVE_GETLINE + #include <stdlib.h> #include <stdio.h> #include <errno.h> #define GETLINE_MINSIZE 16 -ssize_t getline(char **lineptr, size_t *n, FILE *fp) { +ssize_t libedit_getline(char **lineptr, size_t *n, FILE *fp) { int ch; int i = 0; char free_on_err = 0; @@ -58,3 +62,5 @@ (*lineptr)[i] = (char)ch; } } + +#endif