mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	On linux it seems that _XTyname() only takes one argument, no buffer required.
This commit is contained in:
		
							parent
							
								
									b89d6294c6
								
							
						
					
					
						commit
						42b737ba2a
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -72,7 +72,11 @@ GetPty(char **ptySlave, char **ptyMaster)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ((ptyFd = open(*ptyMaster, O_RDWR, 0))) {
 | 
					    if ((ptyFd = open(*ptyMaster, O_RDWR, 0))) {
 | 
				
			||||||
        _Xttynameparams tty_buf;
 | 
					        _Xttynameparams tty_buf;
 | 
				
			||||||
 | 
					#if defined(linux)
 | 
				
			||||||
 | 
						if (c = _XTtyname(ptyFd)) {
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
	if (c = _XTtyname(ptyFd, tty_buf)) {
 | 
						if (c = _XTtyname(ptyFd, tty_buf)) {
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	    *ptySlave = malloc(strlen(c) + 1);
 | 
						    *ptySlave = malloc(strlen(c) + 1);
 | 
				
			||||||
	    (void) strcpy(*ptySlave, c);
 | 
						    (void) strcpy(*ptySlave, c);
 | 
				
			||||||
	    
 | 
						    
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue