X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Flock_file.c;h=bdce7bbb563b2ab10342feb0afd766645aa495bf;hp=5d0be8407aa7c761f9292a988ff1abc2fb88a612;hb=2abb9a7cfb0930e27062088734d306e7d78e4cc2;hpb=ac0b9fcce4167e2959ebc5b8d6efb8511acec66d diff --git a/sbr/lock_file.c b/sbr/lock_file.c index 5d0be84..bdce7bb 100644 --- a/sbr/lock_file.c +++ b/sbr/lock_file.c @@ -15,20 +15,16 @@ ** Ruud de Rooij Sun, 28 Mar 1999 15:34:03 +0200 */ +#include #include #include #include +#include -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include -# include -#else -# ifdef TM_IN_SYS_TIME -# include -# else -# include -# endif #endif +#include #include @@ -435,8 +431,10 @@ lockit(struct lockinfo *li) curlock = li->curlock; tmplock = li->tmplock; - if ((fd = mkstemp(tmplock)) == -1) + if ((fd = mkstemp(tmplock)) == -1) { + advise(NULL, "unable to create temporary file in %s", tmplock); return -1; + } #if 0 /* write our process id into lock file */