--- trivial-2.5-bk/include/net/irda/irias_object.h.orig 2003-01-06 14:08:22.000000000 +1100 +++ trivial-2.5-bk/include/net/irda/irias_object.h 2003-01-06 14:08:22.000000000 +1100 @@ -78,8 +78,6 @@ struct ias_value *value; /* Attribute value */ }; -char *strndup(char *str, int max); - struct ias_object *irias_new_object(char *name, int id); void irias_insert_object(struct ias_object *obj); int irias_delete_object(struct ias_object *obj); @@ -104,6 +102,6 @@ void irias_delete_value(struct ias_value *value); extern struct ias_value missing; -extern hashbin_t *objects; +extern hashbin_t *irias_objects; #endif --- trivial-2.5-bk/net/irda/iriap.c.orig 2003-01-06 14:08:22.000000000 +1100 +++ trivial-2.5-bk/net/irda/iriap.c 2003-01-06 14:08:22.000000000 +1100 @@ -96,9 +96,10 @@ return -ENOMEM; /* Object repository - defined in irias_object.c */ - objects = hashbin_new(HB_LOCK); - if (!objects) { - WARNING("%s: Can't allocate objects hashbin!\n", __FUNCTION__); + irias_objects = hashbin_new(HB_LOCK); + if (!irias_objects) { + WARNING("%s: Can't allocate irias_objects hashbin!\n", + __FUNCTION__); return -ENOMEM; } @@ -147,7 +148,7 @@ irlmp_unregister_service(service_handle); hashbin_delete(iriap, (FREE_FUNC) __iriap_close); - hashbin_delete(objects, (FREE_FUNC) __irias_delete_object); + hashbin_delete(irias_objects, (FREE_FUNC) __irias_delete_object); } /* @@ -971,16 +972,16 @@ struct ias_attrib *attrib; unsigned long flags; - ASSERT( objects != NULL, return 0;); + ASSERT( irias_objects != NULL, return 0;); len = 0; len += sprintf(buf+len, "LM-IAS Objects:\n"); - spin_lock_irqsave(&objects->hb_spinlock, flags); + spin_lock_irqsave(&irias_objects->hb_spinlock, flags); - /* List all objects */ - obj = (struct ias_object *) hashbin_get_first(objects); + /* List all irias_objects */ + obj = (struct ias_object *) hashbin_get_first(irias_objects); while ( obj != NULL) { ASSERT(obj->magic == IAS_OBJECT_MAGIC, return 0;); @@ -1031,9 +1032,9 @@ } spin_unlock(&obj->attribs->hb_spinlock); - obj = (struct ias_object *) hashbin_get_next(objects); + obj = (struct ias_object *) hashbin_get_next(irias_objects); } - spin_unlock_irqrestore(&objects->hb_spinlock, flags); + spin_unlock_irqrestore(&irias_objects->hb_spinlock, flags); return len; } --- trivial-2.5-bk/net/irda/irias_object.c.orig 2003-01-06 14:08:22.000000000 +1100 +++ trivial-2.5-bk/net/irda/irias_object.c 2003-01-06 14:08:22.000000000 +1100 @@ -28,7 +28,7 @@ #include #include -hashbin_t *objects = NULL; +hashbin_t *irias_objects; /* * Used when a missing value needs to be returned @@ -42,7 +42,7 @@ * * Faster, check boundary... Jean II */ -char *strndup(char *str, int max) +static char *strndup(char *str, int max) { char *new_str; int len; @@ -151,7 +151,7 @@ ASSERT(obj != NULL, return -1;); ASSERT(obj->magic == IAS_OBJECT_MAGIC, return -1;); - node = hashbin_remove_this(objects, (irda_queue_t *) obj); + node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj); if (!node) return 0; /* Already removed */ @@ -202,7 +202,7 @@ ASSERT(obj != NULL, return;); ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); - hashbin_insert(objects, (irda_queue_t *) obj, 0, obj->name); + hashbin_insert(irias_objects, (irda_queue_t *) obj, 0, obj->name); } /* @@ -216,7 +216,7 @@ ASSERT(name != NULL, return NULL;); /* Unsafe (locking), object might change */ - return hashbin_lock_find(objects, 0, name); + return hashbin_lock_find(irias_objects, 0, name); } /* @@ -276,7 +276,7 @@ unsigned long flags; /* Find object */ - obj = hashbin_lock_find(objects, 0, obj_name); + obj = hashbin_lock_find(irias_objects, 0, obj_name); if (obj == NULL) { WARNING("%s: Unable to find object: %s\n", __FUNCTION__, obj_name);