Nope, I've worked through the code and can't see why it's failing. I'd suggest you raise a new issue and point back to this thread.
From what I can see:
uuid.c:
#include "tvheadend.h"
tvheadend.h:
#include "tvhlog.h"
and
extern pthread_mutex_t atomic_lock
tvhlog.h:
#include "atomic.h"
and then atomic.h relies on
#if ENABLE_ATOMIC64
(which will be false in build.h because of the detection of 64-bit on a 32-bit platform will fail) and then calls
pthread_mutex_lock(&atomic_lock)
instead - which is where the error occurs because
atomic_lock
is undefined here. However, main.c defines it
pthread_mutex_t atomic_lock
- so it's almost like the
extern
definition isn't being honoured.
I still don't understand why it would work before but not now: the new
atomic_dec_u64()
is virtually identical to the previous
atomic_add_u64()
- and it's
atomic_add_u64()
that's failing anyway.
Two thoughts:
1. If you checkout a previously-working version of the code, can you still build it? Specifically, anything prior to commit:83166081, which is when atomic.h was last really touched?
2. Has anything else updated on your system recently - kernel, GCC or similar - that could explain this?
(slightly-informed guessing on my part, but guessing nevertheless).