mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 03:32:25 -05:00 
			
		
		
		
	[chore] bump ncruces/go-sqlite3 to v0.25.0 (#3966)
This commit is contained in:
		
					parent
					
						
							
								6473886c8e
							
						
					
				
			
			
				commit
				
					
						db4b857159
					
				
			
		
					 36 changed files with 636 additions and 578 deletions
				
			
		
							
								
								
									
										27
									
								
								vendor/github.com/ncruces/go-sqlite3/vfs/os_bsd.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								vendor/github.com/ncruces/go-sqlite3/vfs/os_bsd.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -50,11 +50,15 @@ func osDowngradeLock(file *os.File, _ LockLevel) _ErrorCode { | |||
| } | ||||
| 
 | ||||
| func osReleaseLock(file *os.File, _ LockLevel) _ErrorCode { | ||||
| 	err := unix.Flock(int(file.Fd()), unix.LOCK_UN) | ||||
| 	if err != nil { | ||||
| 		return _IOERR_UNLOCK | ||||
| 	for { | ||||
| 		err := unix.Flock(int(file.Fd()), unix.LOCK_UN) | ||||
| 		if err == nil { | ||||
| 			return _OK | ||||
| 		} | ||||
| 		if err != unix.EINTR { | ||||
| 			return _IOERR_UNLOCK | ||||
| 		} | ||||
| 	} | ||||
| 	return _OK | ||||
| } | ||||
| 
 | ||||
| func osCheckReservedLock(file *os.File) (bool, _ErrorCode) { | ||||
|  | @ -89,13 +93,18 @@ func osLock(file *os.File, typ int16, start, len int64, def _ErrorCode) _ErrorCo | |||
| } | ||||
| 
 | ||||
| func osUnlock(file *os.File, start, len int64) _ErrorCode { | ||||
| 	err := unix.FcntlFlock(file.Fd(), unix.F_SETLK, &unix.Flock_t{ | ||||
| 	lock := unix.Flock_t{ | ||||
| 		Type:  unix.F_UNLCK, | ||||
| 		Start: start, | ||||
| 		Len:   len, | ||||
| 	}) | ||||
| 	if err != nil { | ||||
| 		return _IOERR_UNLOCK | ||||
| 	} | ||||
| 	return _OK | ||||
| 	for { | ||||
| 		err := unix.FcntlFlock(file.Fd(), unix.F_SETLK, &lock) | ||||
| 		if err == nil { | ||||
| 			return _OK | ||||
| 		} | ||||
| 		if err != unix.EINTR { | ||||
| 			return _IOERR_UNLOCK | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue