mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Only provide execvpe(3) when needed
Check for the existence of execvpe(3) and only provide the FreeBSD compat version if required. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Brooks Davis <brooks.davis@sri.com> Closes #15609
This commit is contained in:
		
							parent
							
								
									32cd2da551
								
							
						
					
					
						commit
						5668411713
					
				| @ -31,7 +31,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER], [ | |||||||
| 	ZFS_AC_CONFIG_USER_MAKEDEV_IN_MKDEV | 	ZFS_AC_CONFIG_USER_MAKEDEV_IN_MKDEV | ||||||
| 	ZFS_AC_CONFIG_USER_ZFSEXEC | 	ZFS_AC_CONFIG_USER_ZFSEXEC | ||||||
| 
 | 
 | ||||||
| 	AC_CHECK_FUNCS([issetugid mlockall strlcat strlcpy]) | 	AC_CHECK_FUNCS([execvpe issetugid mlockall strlcat strlcpy]) | ||||||
| 
 | 
 | ||||||
| 	AC_SUBST(RM) | 	AC_SUBST(RM) | ||||||
| ]) | ]) | ||||||
|  | |||||||
| @ -57,6 +57,8 @@ | |||||||
| extern size_t spl_pagesize(void); | extern size_t spl_pagesize(void); | ||||||
| #define	PAGESIZE	(spl_pagesize()) | #define	PAGESIZE	(spl_pagesize()) | ||||||
| 
 | 
 | ||||||
|  | #ifndef HAVE_EXECVPE | ||||||
| extern int execvpe(const char *name, char * const argv[], char * const envp[]); | extern int execvpe(const char *name, char * const argv[], char * const envp[]); | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -38,7 +38,8 @@ | |||||||
| #define	ZFS_KMOD	"openzfs" | #define	ZFS_KMOD	"openzfs" | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| 
 | #ifndef HAVE_EXECVPE | ||||||
|  | /* FreeBSD prior to 15 lacks execvpe */ | ||||||
| static int | static int | ||||||
| execvPe(const char *name, const char *path, char * const *argv, | execvPe(const char *name, const char *path, char * const *argv, | ||||||
|     char * const *envp) |     char * const *envp) | ||||||
| @ -192,6 +193,7 @@ execvpe(const char *name, char * const argv[], char * const envp[]) | |||||||
| 
 | 
 | ||||||
| 	return (execvPe(name, path, argv, envp)); | 	return (execvPe(name, path, argv, envp)); | ||||||
| } | } | ||||||
|  | #endif /* !HAVE_EXECVPE */ | ||||||
| 
 | 
 | ||||||
| static __thread char errbuf[ERRBUFLEN]; | static __thread char errbuf[ERRBUFLEN]; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Brooks Davis
						Brooks Davis