From 98a20b8ba468d47c098d067f089b27c5c89815d9 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Tue, 9 May 2023 00:31:33 +0300 Subject: trans: Port to x86_64 Message-Id: <20230508213136.608575-39-bugaevc@gmail.com> --- trans/magic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'trans/magic.c') diff --git a/trans/magic.c b/trans/magic.c index 4e534e7a..93e69921 100644 --- a/trans/magic.c +++ b/trans/magic.c @@ -189,7 +189,7 @@ magic_open (struct trivfs_control *cntl, if (!err) { /* We consume the reference for DOTDOT. */ - (*cred)->po->hook = (void *) dotdot; + (*cred)->po->hook = (void *) (uintptr_t) dotdot; struct magic *const m = cntl->hook; m->nusers++; } @@ -199,7 +199,7 @@ magic_open (struct trivfs_control *cntl, static void magic_peropen_destroy (struct trivfs_peropen *po) { - mach_port_deallocate (mach_task_self (), (mach_port_t) po->hook); + mach_port_deallocate (mach_task_self (), (mach_port_t)(uintptr_t) po->hook); } @@ -261,7 +261,7 @@ trivfs_S_dir_lookup (struct trivfs_protid *cred, ++name; strcpy (retry_name, name); *retry_type = FS_RETRY_REAUTH; - *retrypt = (mach_port_t) cred->po->hook; + *retrypt = (mach_port_t)(uintptr_t) cred->po->hook; *retrypt_type = MACH_MSG_TYPE_COPY_SEND; return 0; } @@ -300,7 +300,7 @@ trivfs_S_dir_lookup (struct trivfs_protid *cred, /* Execute the open */ - dotdot = (mach_port_t) cred->po->hook; + dotdot = (mach_port_t)(uintptr_t) cred->po->hook; err = iohelp_dup_iouser (&user, cred->user); if (err) return err; -- cgit v1.2.3