Skip to content

Instantly share code, notes, and snippets.

@aurora
Created February 6, 2012 12:01
Show Gist options
  • Save aurora/1751760 to your computer and use it in GitHub Desktop.
Save aurora/1751760 to your computer and use it in GitHub Desktop.
gettext on osx lion

Problem:

stpncpy.c:34: error: expected declaration specifiers or ‘...’ before numeric constant
stpncpy.c:34: error: expected ‘)’ before ‘!=’ token
stpncpy.c:34: error: expected ‘)’ before ‘?’ token
make[4]: *** [stpncpy.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

Solution:

--- ./gettext-tools/gnulib-lib/stpncpy.c
+++ ./gettext-tools/gnulib-lib/stpncpy.c
@@ -31,7 +31,7 @@
/* Copy no more than N bytes of SRC to DST, returning a pointer past the
last non-NUL byte written into DST.  */
char *
-__stpncpy (char *dest, const char *src, size_t n)
+__stpcpy (char *dest, const char *src, size_t n)
{
   char c;
   char *s = dest;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment