wiedehopf / readsb

ADS-B decoder swiss knife
Other
346 stars 78 forks source link

Cast pthread_self() as uintptr_t #3

Closed Dennis14e closed 3 years ago

Dennis14e commented 3 years ago

This pr fixes following compile error on Alpine 3.13:

util.c: In function 'get_seed':
util.c:161:59: error: invalid operands to binary ^ (have 'long int' and 'pthread_t' {aka 'struct __pthread *'})
  161 |     return (time.tv_sec ^ time.tv_nsec ^ (getpid() << 16) ^ pthread_self());
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
      |                                        |                    |
      |                                        long int             pthread_t {aka struct __pthread *}