git-1.8.4 fails to build due to fgetc is a macro

Natanael Copa natanael.copa at gmail.com
Tue Aug 27 07:43:31 UTC 2013


Hi,

git-1.8.4 fails to build with this error:

cc -o config.o -c -MF ./.depend/config.o.d -MQ config.o -MMD -MP -Os
-fomit-frame-pointer -pipe -g -O2 -Wall -I. -DUSE_LIBPCRE -DNO_NSEC
-DNO_GETTEXT -DNO_ICONV  -DHAVE_PATHS_H -DHAVE_DEV_TTY
-DSHA1_HEADER='<openssl/sha.h>'  -DNO_STRLCPY -DUSE_WILDMATCH -DNO_MKSTEMPS
-DSHELL_PATH='"/bin/sh"' -DETC_GITCONFIG='"/etc/gitconfig"' config.c
In file included from /usr/include/stdio.h:72:0,
                 from git-compat-util.h:99,
                 from cache.h:4,
                 from config.c:8:
config.c: In function 'get_next_char':
config.c:220:14: error: expected identifier before '(' token
  int c = cf->fgetc(cf);
              ^
config.c:220:14: error: expected statement before ')' token
  int c = cf->fgetc(cf);
              ^
config.c:220:14: error: expected statement before ')' token
  int c = cf->fgetc(cf);
              ^
config.c:224:11: error: expected identifier before '(' token
   c = cf->fgetc(cf);
           ^
make: *** [config.o] Error 1

The problem appear to be that fgetc is a macro in uClibc.

Any idea what the proper fix for this would be? Is it really a good idea to
use macro instead of function for fgetc/fputc?

-- 
Natanael Copa


More information about the uClibc mailing list