-extern int falloc __P((struct proc *p,
- struct file **resultfp, int *resultfd));
-extern void ffree __P((struct file *fp));
-extern struct filedesc *fdcopy __P((struct proc *p));
-extern void fdfree __P((struct proc *p));
-extern void fdexec __P((struct proc *p));
+extern int falloc(proc_t p, struct fileproc **resultfp, int *resultfd, vfs_context_t ctx);
+
+#ifdef __APPLE_API_PRIVATE
+typedef struct fileproc *(*fp_allocfn_t)(void *);
+extern int falloc_withalloc(proc_t p, struct fileproc **resultfp,
+ int *resultfd, vfs_context_t ctx,
+ fp_allocfn_t fp_zalloc, void *crarg);
+
+extern struct filedesc *fdcopy(proc_t p, struct vnode *uth_cdir);
+extern void fdfree(proc_t p);
+extern void fdexec(proc_t p, short flags);
+#endif /* __APPLE_API_PRIVATE */