diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-29 11:06:44 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-29 11:06:44 -0400 |
commit | 534da37927f97ae7cb1b468963ba9bca747209ea (patch) | |
tree | ca7184161840627851c769babf46b98a883b1376 /src/timezone | |
parent | 6d257e732b358ee601a114fe3d1640a46317e554 (diff) | |
download | postgresql-534da37927f97ae7cb1b468963ba9bca747209ea.tar.gz |
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.
Diffstat (limited to 'src/timezone')
-rw-r--r-- | src/timezone/zic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/timezone/zic.c b/src/timezone/zic.c index f9cbac9f00..653e2db71e 100644 --- a/src/timezone/zic.c +++ b/src/timezone/zic.c @@ -811,6 +811,7 @@ dolink(char const * fromfield, char const * tofield) link_errno = link(fromname, toname) == 0 ? 0 : errno; if (link_errno != 0) { +#ifdef HAVE_SYMLINK const char *s = fromfield; const char *t; char *p; @@ -838,6 +839,7 @@ dolink(char const * fromfield, char const * tofield) strerror(link_errno)); } else +#endif /* HAVE_SYMLINK */ { FILE *fp, *tp; |