mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Add define for timersub to compat.h.
This commit is contained in:
		
							
								
								
									
										12
									
								
								compat.h
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								compat.h
									
									
									
									
									
								
							@@ -152,6 +152,18 @@ typedef uint64_t u_int64_t;
 | 
			
		||||
	} while (0)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef timersub
 | 
			
		||||
#define timersub(tvp, uvp, vvp)                                         \
 | 
			
		||||
	do {                                                            \
 | 
			
		||||
		(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec;          \
 | 
			
		||||
		(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec;       \
 | 
			
		||||
		if ((vvp)->tv_usec < 0) {                               \
 | 
			
		||||
			(vvp)->tv_sec--;                                \
 | 
			
		||||
			(vvp)->tv_usec += 1000000;                      \
 | 
			
		||||
		}                                                       \
 | 
			
		||||
	} while (0)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef TTY_NAME_MAX
 | 
			
		||||
#define TTY_NAME_MAX 32
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user