[102310] trunk/dports/sysutils/natsort
Ryan Schmidt
ryandesign at macports.org
Thu Jan 31 03:08:07 PST 2013
On Jan 30, 2013, at 11:16, jberry at macports.org wrote:
> Revision: 102310
> https://trac.macports.org/changeset/102310
> Author: jberry at macports.org
> Date: 2013-01-30 09:16:19 -0800 (Wed, 30 Jan 2013)
> Log Message:
> -----------
> natsort: fix build issue with pickier compiler; add openmaintainer with permission of maintainer
It's not an issue with the compiler; the issue is that Lion introduces a function called getline, which conflicts with the function of the same name that this project defines.
> Added: trunk/dports/sysutils/natsort/files/natsort.c.diff
> ===================================================================
> --- trunk/dports/sysutils/natsort/files/natsort.c.diff (rev 0)
> +++ trunk/dports/sysutils/natsort/files/natsort.c.diff 2013-01-30 17:16:19 UTC (rev 102310)
> @@ -0,0 +1,20 @@
> +--- natsort.c.orig 2013-01-29 17:23:19.000000000 -0800
> ++++ natsort.c 2013-01-29 17:24:23.000000000 -0800
> +@@ -40,7 +40,7 @@
> + #endif
> +
> + static int fold_case = 0, verbose = 0, reverse = 0;
> +-size_t getline(char **lineptr, int *n, FILE *stream);
> ++size_t redundant_getline(char **lineptr, int *n, FILE *stream);
> +
> + static void trace_result(char const *a, char const *b, int ret)
> + {
> +@@ -170,7 +170,7 @@
> + }
> +
> + /* This code is public domain -- Will Hartung 4/9/09 */
> +-size_t getline(char **lineptr, int *n, FILE *stream) {
> ++size_t redundant_getline(char **lineptr, int *n, FILE *stream) {
> + char *bufptr = NULL;
> + char *p = bufptr;
> + size_t size;
This patch is incomplete: you've changed the definition of the project's getline function, but haven't changed the place where the project calls that function, so this fails to build on Snow Leopard with:
Undefined symbols:
"_getline", referenced from:
_main in natsort.o
(maybe you meant: _redundant_getline)
ld: symbol(s) not found
because Snow Leopard doesn't provide a getline function.
Fixed along with other changes:
https://trac.macports.org/changeset/102329
More information about the macports-dev
mailing list