1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-27 22:56:53 +03:00

Protect zic's symlink() call with #ifdef HAVE_SYMLINK.

The IANA crew seem to think that symlink() exists everywhere nowadays,
and they may well be right.  But we use #ifdef HAVE_SYMLINK elsewhere
so for consistency we should do it here too.  Noted by Michael Paquier.
This commit is contained in:
Tom Lane 2016-03-29 11:06:44 -04:00
parent 6d257e732b
commit 534da37927

View File

@ -811,6 +811,7 @@ dolink(char const * fromfield, char const * tofield)
link_errno = link(fromname, toname) == 0 ? 0 : errno; link_errno = link(fromname, toname) == 0 ? 0 : errno;
if (link_errno != 0) if (link_errno != 0)
{ {
#ifdef HAVE_SYMLINK
const char *s = fromfield; const char *s = fromfield;
const char *t; const char *t;
char *p; char *p;
@ -838,6 +839,7 @@ dolink(char const * fromfield, char const * tofield)
strerror(link_errno)); strerror(link_errno));
} }
else else
#endif /* HAVE_SYMLINK */
{ {
FILE *fp, FILE *fp,
*tp; *tp;