diff options
| author | 2000-03-30 23:30:25 +0000 | |
|---|---|---|
| committer | 2000-03-30 23:30:25 +0000 | |
| commit | a6dbdbb39f8e9ff84dae9aa8fc706cbe59ade7e2 (patch) | |
| tree | 841dd36b17587013ba79e08373f4ba9b655e1a87 /lib/libc/time | |
| parent | Make 'zic -l' actually work. I guess we all just do the symlink (diff) | |
| download | wireguard-openbsd-a6dbdbb39f8e9ff84dae9aa8fc706cbe59ade7e2.tar.xz wireguard-openbsd-a6dbdbb39f8e9ff84dae9aa8fc706cbe59ade7e2.zip | |
Try a hard link before a soft one since we want hard links in
the zoneinfo dir.
Diffstat (limited to 'lib/libc/time')
| -rw-r--r-- | lib/libc/time/zic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/time/zic.c b/lib/libc/time/zic.c index a02252f2698..62422ec5c51 100644 --- a/lib/libc/time/zic.c +++ b/lib/libc/time/zic.c @@ -1,6 +1,6 @@ #if defined(LIBC_SCCS) && !defined(lint) && !defined(NOID) static char elsieid[] = "@(#)zic.c 7.99"; -static char rcsid[] = "$OpenBSD: zic.c,v 1.11 2000/03/30 23:26:45 millert Exp $"; +static char rcsid[] = "$OpenBSD: zic.c,v 1.12 2000/03/30 23:30:25 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include "private.h" @@ -611,10 +611,10 @@ const char * const tofile; if (mkdirs(toname) != 0) (void) exit(EXIT_FAILURE); -#if (HAVE_SYMLINK - 0) - result = symlink(fromname, toname); -#else result = link(fromname, toname); +#if (HAVE_SYMLINK - 0) + if (result != 0 && errno == EXDEV) + result = symlink(fromname, toname); #endif if (result != 0) { const char *e = strerror(errno); |
