components/trousers/patches/hosttable.c.patch
changeset 777 e2e604cdbd6a
parent 776 e524216b0586
child 778 9d5e4d6466cd
equal deleted inserted replaced
776:e524216b0586 777:e2e604cdbd6a
     1 --- src/tspi/rpc/hosttable.c.old	Thu Jan 28 13:27:59 2010
       
     2 +++ src/tspi/rpc/hosttable.c	Thu Aug  5 14:24:00 2010
       
     3 @@ -22,7 +22,7 @@
       
     4  struct host_table *ht = NULL;
       
     5  
       
     6  TSS_RESULT
       
     7 -host_table_init()
       
     8 +static host_table_init()
       
     9  {
       
    10  	ht = calloc(1, sizeof(struct host_table));
       
    11  	if (ht == NULL) {
       
    12 @@ -36,8 +36,7 @@
       
    13  }
       
    14  
       
    15  #ifdef SOLARIS
       
    16 -#pragma init(_init)
       
    17 -void _init(void)
       
    18 +static void my_init(void)
       
    19  #else
       
    20  void __attribute__ ((constructor)) my_init(void)
       
    21  #endif
       
    22 @@ -46,7 +45,7 @@
       
    23  	__tspi_obj_list_init();
       
    24  }
       
    25  
       
    26 -void
       
    27 +static void
       
    28  host_table_final()
       
    29  {
       
    30  	struct host_table_entry *hte, *next = NULL;
       
    31 @@ -70,8 +69,7 @@
       
    32  }
       
    33  
       
    34  #ifdef SOLARIS
       
    35 -#pragma fini(_fini)
       
    36 -void _fini(void)
       
    37 +static void my_fini(void)
       
    38  #else
       
    39  void __attribute__ ((destructor)) my_fini(void)
       
    40  #endif
       
    41 @@ -79,6 +77,11 @@
       
    42  	host_table_final();
       
    43  }
       
    44  
       
    45 +#ifdef SOLARIS
       
    46 +#pragma init(my_init)
       
    47 +#pragma fini(my_fini)
       
    48 +#endif
       
    49 +
       
    50  TSS_RESULT
       
    51  __tspi_add_table_entry(TSS_HCONTEXT tspContext, BYTE *host, int type, struct host_table_entry **ret)
       
    52  {
       
    53