Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 534da37

Browse files
committed
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.
1 parent 6d257e7 commit 534da37

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/timezone/zic.c

+2
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ dolink(char const * fromfield, char const * tofield)
811811
link_errno = link(fromname, toname) == 0 ? 0 : errno;
812812
if (link_errno != 0)
813813
{
814+
#ifdef HAVE_SYMLINK
814815
const char *s = fromfield;
815816
const char *t;
816817
char *p;
@@ -838,6 +839,7 @@ dolink(char const * fromfield, char const * tofield)
838839
strerror(link_errno));
839840
}
840841
else
842+
#endif /* HAVE_SYMLINK */
841843
{
842844
FILE *fp,
843845
*tp;

0 commit comments

Comments
 (0)