mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux 3.4 compat, __clear_close_on_exec replaces FD_CLR
torvalds/linux@1dce27c5aa introduced __clear_close_on_exec() as a replacement for FD_CLR. Further commits appear to have removed FD_CLR from the Linux source tree. This causes the following failure: error: implicit declaration of function '__FD_CLR' [-Werror=implicit-function-declaration] To correct this we update the code to use the current __clear_close_on_exec() interface for readability. Then we introduce an autotools check to determine if __clear_close_on_exec() is available. If it isn't then we define some compatibility logic which used the older FD_CLR() interface. Signed-off-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #124
This commit is contained in:
committed by
Brian Behlendorf
parent
eaac9ba510
commit
e0093fea58
@@ -83,5 +83,9 @@ extern kern_path_parent_t kern_path_parent_fn;
|
||||
# define spl_kern_path_parent(path, nd) path_lookup(path, LOOKUP_PARENT, nd)
|
||||
#endif /* HAVE_KERN_PATH_PARENT_HEADER */
|
||||
|
||||
#ifndef HAVE_CLEAR_CLOSE_ON_EXEC
|
||||
#define __clear_close_on_exec(fd, fdt) FD_CLR(fd, fdt->close_on_exec)
|
||||
#endif
|
||||
|
||||
#endif /* SPL_FILE_COMPAT_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user