]> diplodocus.org Git - nmh/commitdiff
Add compilation guard around lkopen_flock.
authorLyndon Nerenberg <lyndon@orthanc.ca>
Sun, 30 Jun 2013 19:39:46 +0000 (12:39 -0700)
committerLyndon Nerenberg <lyndon@orthanc.ca>
Sun, 30 Jun 2013 19:39:46 +0000 (12:39 -0700)
Oracle Solaris 11 doesn't have flock().

sbr/lock_file.c

index 0e83ac829487c671995f30202d4b9db1b44d1898..01d7ae49a849e4710c46ca7942334dfc05d2de54 100644 (file)
@@ -380,6 +380,7 @@ lkopen_fcntl(const char *file, int access, mode_t mode)
 }
 
 
+#ifdef HAVE_FLOCK
 /*
  * Open and lock a file, using flock locking
  */
@@ -412,7 +413,7 @@ lkopen_flock(const char *file, int access, mode_t mode)
     errno = saved_errno;
     return -1;
 }
-
+#endif /* HAVE_FLOCK */
 
 /*
  * Open and lock a file, using lockf locking