* Don't use fdatasync since it doesn't work on Snow Leopard.
* Don't refer to config.h in util.hh, because config.h is not installed (http://hydra.nixos.org/build/303053).
This commit is contained in:
		
							parent
							
								
									7db2831d3a
								
							
						
					
					
						commit
						84a4dd5ff0
					
				
					 4 changed files with 3 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -240,7 +240,7 @@ void LocalStore::appendReferrer(const Path & from, const Path & to, bool lock)
 | 
			
		|||
    string s = " " + to;
 | 
			
		||||
    writeFull(fd, (const unsigned char *) s.c_str(), s.size());
 | 
			
		||||
 | 
			
		||||
    if (doFsync) fdatasync(fd);
 | 
			
		||||
    if (doFsync) fsync(fd);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -271,7 +271,7 @@ void LocalStore::rewriteReferrers(const Path & path, bool purge, PathSet referre
 | 
			
		|||
    
 | 
			
		||||
    writeFull(fd, (const unsigned char *) s.c_str(), s.size());
 | 
			
		||||
 | 
			
		||||
    if (doFsync) fdatasync(fd);
 | 
			
		||||
    if (doFsync) fsync(fd);
 | 
			
		||||
    
 | 
			
		||||
    fd.close(); /* for Windows; can't rename open file */
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue