Make kdc build on windows
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
This commit is contained in:

committed by
Love Hornquist Astrand

parent
caf8f87598
commit
b191b1e12f
10
kdc/kstash.c
10
kdc/kstash.c
@@ -144,13 +144,19 @@ main(int argc, char **argv)
|
||||
if(ret)
|
||||
unlink(new);
|
||||
else {
|
||||
#ifndef NO_POSIX_LINKS
|
||||
unlink(old);
|
||||
if(link(keyfile, old) < 0 && errno != ENOENT) {
|
||||
ret = errno;
|
||||
unlink(new);
|
||||
} else if(rename(new, keyfile) < 0) {
|
||||
ret = errno;
|
||||
} else {
|
||||
#endif
|
||||
if(rename(new, keyfile) < 0) {
|
||||
ret = errno;
|
||||
}
|
||||
#ifndef NO_POSIX_LINKS
|
||||
}
|
||||
#endif
|
||||
}
|
||||
out:
|
||||
free(old);
|
||||
|
Reference in New Issue
Block a user