Global variable declared but "not declared in this scope" error

I agree with majenko. The library, if it is appropriate for the sketch to change the value, should provide the means for the sketch to do so.

In the case of the Time library, I can see no compelling reason for the library to not expose the syncErrors value. On the other hand, I can see no benefit in knowing how many times the sync failed, without knowing the time frame in which those failures occurred.

3 sync failures over the course of 10 minutes is one thing. 3 sync failures over the course of 10 years is something else.