[tor-bugs] #30184 [Core Tor/Tor]: release-0.2.9 doesn't compile on old rhel

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Apr 15 06:53:49 UTC 2019


#30184: release-0.2.9 doesn't compile on old rhel
------------------------------+--------------------
     Reporter:  arma          |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------
 On rhel6, building release-0.2.9 (git commit ca008906), I get
 {{{
   CC     src/or/src_or_libtor_testing_a-rephist.o
 src/or/rephist.c:91: error: redefinition of typedef ‘bw_array_t’
 src/or/rephist.h:120: note: previous declaration of ‘bw_array_t’ was here
 make[1]: *** [src/or/src_or_libtor_testing_a-rephist.o] Error 1
 }}}

 Looks like when we backported some stuff, we didn't backport all of the
 subsequent fixes on the stuff.

 Here is a fix that lets it compile again (there could for sure be a better
 fix than this):
 {{{
 index dc86fad..d8f7eb2 100644
 --- a/src/or/rephist.c
 +++ b/src/or/rephist.c
 @@ -88,7 +88,6 @@
  static void bw_arrays_init(void);
  static void predicted_ports_init(void);

 -typedef struct bw_array_t bw_array_t;
  STATIC uint64_t find_largest_max(bw_array_t *b);
  STATIC void commit_max(bw_array_t *b);
  STATIC void advance_obs(bw_array_t *b);
 diff --git a/src/or/rephist.h b/src/or/rephist.h
 index c464b34..072987f 100644
 --- a/src/or/rephist.h
 +++ b/src/or/rephist.h
 @@ -114,10 +114,10 @@ void rep_hist_log_link_protocol_counts(void);

  extern uint64_t rephist_total_alloc;
  extern uint32_t rephist_total_num;
 +typedef struct bw_array_t bw_array_t;
  #ifdef TOR_UNIT_TESTS
  extern int onion_handshakes_requested[MAX_ONION_HANDSHAKE_TYPE+1];
  extern int onion_handshakes_assigned[MAX_ONION_HANDSHAKE_TYPE+1];
 -typedef struct bw_array_t bw_array_t;
  extern bw_array_t *write_array;
  #endif
 }}}

 (My bwauth still runs on 0.2.9, since I'm under the impression that's the
 last version that works well with bwauths. That's how I noticed.)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30184>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list