Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix not-HAVE_SYMLINK code in zic.c.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 26 Oct 2016 17:40:41 +0000 (13:40 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 26 Oct 2016 17:41:07 +0000 (13:41 -0400)
I broke this in commit f3094920a.  Apparently it's dead code anyway,
at least as far as our buildfarm is concerned (and the upstream IANA
code doesn't worry at all about symlink() not being present).
But as long as the rest of our code is willing to guard against not
having symlink(), this should too.  Noted while investigating a
tangentially-related complaint from Sandeep Thakkar.

Back-patch to keep branches in sync.

src/timezone/zic.c

index 1ff47301614dd188a294da5b069b1a2c388dd150..cd9f74878e0371eaf273df759b55e6d16accfeb1 100644 (file)
@@ -939,9 +939,11 @@ dolink(char const * fromfield, char const * tofield, bool staysymlink)
            if (link_errno != ENOTSUP)
                warning(_("copy used because hard link failed: %s"),
                        strerror(link_errno));
+#ifdef HAVE_SYMLINK
            else if (symlink_errno != ENOTSUP)
                warning(_("copy used because symbolic link failed: %s"),
                        strerror(symlink_errno));
+#endif
        }
    }
 }