projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d257e7
)
Protect zic's symlink() call with #ifdef HAVE_SYMLINK.
author
Tom Lane
<tgl@sss.pgh.pa.us>
Tue, 29 Mar 2016 15:06:44 +0000
(11:06 -0400)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Tue, 29 Mar 2016 15:06:44 +0000
(11:06 -0400)
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.
src/timezone/zic.c
patch
|
blob
|
blame
|
history
diff --git
a/src/timezone/zic.c
b/src/timezone/zic.c
index f9cbac9f0068698775a51c3d9114cf1824317870..653e2db71e665e58565dc4e3d067cf08f665512b 100644
(file)
--- 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;