mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Rename the flock variable to f_lock.
flock() is a function on FreeBSD, and the variable shadowed its definition.
This commit is contained in:
		
							parent
							
								
									6f44792806
								
							
						
					
					
						commit
						bce211e416
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		| 
						 | 
					@ -1193,22 +1193,22 @@ int pa_check_in_group(gid_t g) {
 | 
				
			||||||
  (advisory on UNIX, mandatory on Windows) */
 | 
					  (advisory on UNIX, mandatory on Windows) */
 | 
				
			||||||
int pa_lock_fd(int fd, int b) {
 | 
					int pa_lock_fd(int fd, int b) {
 | 
				
			||||||
#ifdef F_SETLKW
 | 
					#ifdef F_SETLKW
 | 
				
			||||||
    struct flock flock;
 | 
					    struct flock f_lock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Try a R/W lock first */
 | 
					    /* Try a R/W lock first */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    flock.l_type = (short) (b ? F_WRLCK : F_UNLCK);
 | 
					    f_lock.l_type = (short) (b ? F_WRLCK : F_UNLCK);
 | 
				
			||||||
    flock.l_whence = SEEK_SET;
 | 
					    f_lock.l_whence = SEEK_SET;
 | 
				
			||||||
    flock.l_start = 0;
 | 
					    f_lock.l_start = 0;
 | 
				
			||||||
    flock.l_len = 0;
 | 
					    f_lock.l_len = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (fcntl(fd, F_SETLKW, &flock) >= 0)
 | 
					    if (fcntl(fd, F_SETLKW, &f_lock) >= 0)
 | 
				
			||||||
        return 0;
 | 
					        return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Perhaps the file descriptor qas opened for read only, than try again with a read lock. */
 | 
					    /* Perhaps the file descriptor qas opened for read only, than try again with a read lock. */
 | 
				
			||||||
    if (b && errno == EBADF) {
 | 
					    if (b && errno == EBADF) {
 | 
				
			||||||
        flock.l_type = F_RDLCK;
 | 
					        f_lock.l_type = F_RDLCK;
 | 
				
			||||||
        if (fcntl(fd, F_SETLKW, &flock) >= 0)
 | 
					        if (fcntl(fd, F_SETLKW, &f_lock) >= 0)
 | 
				
			||||||
            return 0;
 | 
					            return 0;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue