Welcome.
The problem is that the Arduino IDE parses your sketch, extracts function prototypes, and moves them to the top. Your sketch (roughly) becomes this...
#include <Time.h>
time_t TimeFromPartSpec(PartSpec_t& part);
void SetTimeElementsFromPartSpec(tmElements_t to_elements, PartSpec_t& part);
// Types
typedef struct {
int current_value[6];
} PartSpec_t;
void setup() {
}
void loop() {
PartSpec_t part;
time_t a_time = TimeFromPartSpec(part);
tmElements_t elements;
SetTimeElementsFromPartSpec(elements, part);
}
time_t TimeFromPartSpec(PartSpec_t& part) {
tmElements_t elements;
SetTimeElementsFromPartSpec(elements, part);
time_t to_time = makeTime(elements);
return to_time;
}
void SetTimeElementsFromPartSpec(tmElements_t to_elements, PartSpec_t& part) {
to_elements.Year = y2kYearToTm(part.current_value[0]);
}
Probably the best solution is to create a second tab (header file) containing the PartSpec_t definition.