summaryrefslogtreecommitdiff
path: root/libports/import-port.c
diff options
context:
space:
mode:
Diffstat (limited to 'libports/import-port.c')
-rw-r--r--libports/import-port.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libports/import-port.c b/libports/import-port.c
index c337c856..2c638e18 100644
--- a/libports/import-port.c
+++ b/libports/import-port.c
@@ -93,7 +93,11 @@ ports_import_port (struct port_class *class, struct port_bucket *bucket,
bucket->count++;
class->count++;
pthread_mutex_unlock (&_ports_lock);
-
+
+ /* This is an optimization. It may fail. */
+ mach_port_set_protected_payload (mach_task_self (), port,
+ (unsigned long) pi);
+
mach_port_move_member (mach_task_self (), port, bucket->portset);
if (stat.mps_srights)