careadlink: fix compilation error on mingw
authorEric Blake <eblake@redhat.com>
Fri, 8 Apr 2011 14:51:56 +0000 (08:51 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 8 Apr 2011 14:59:00 +0000 (08:59 -0600)
commit9cc991025d6139a3a8f3e0f1570bf39a66f3aafa
tree4f47d6a2e75973c27ad8ccebf83f5358d5f7f57c
parentbd5d1e621103ea3f7fbae09010348ce2df563808
careadlink: fix compilation error on mingw

Mingw compilation failed:

lib/careadlinkat.c: In function 'careadlinkat':
lib/careadlinkat.c:143:39: error: 'const struct allocator' has no member named 'malloc'
lib/careadlinkat.c:149:66: error: 'const struct allocator' has no member named 'realloc'
lib/careadlinkat.c:152:39: error: 'const struct allocator' has no member named 'realloc'
lib/careadlinkat.c:169:27: error: 'const struct allocator' has no member named 'malloc'
make[4]: *** [careadlinkat.lo] Error 1

because "careadlinkat.h" includes enough system headers to get
replacement names defined for malloc, then "allocator.h" defines
fields with those replacement names, then undefining the macros
tries to reference missing fields.

I figured this patch is less invasive than changing the field names
in allocator.h, and possibly requiring clients to change.

* lib/careadlinkat.c (standard_allocator): Avoid renaming fields
within struct allocator.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
lib/careadlinkat.c