Irit Katriel added the comment:
timval is defined in sys/time.h.
This would be something to do with your setup, but you did not provide any
information about your system and the steps you took to get to this point so
it's hard to know what happened.
In any case, 3.7 is no longer maintained
New submission from Mithil :
pytime.h compilation gives warnings -
pytime.h:123:59: warning: 'struct timeval' declared inside parameter list will
not be visible outside of this definition or declaration
PyAPI_FUNC(int) _PyTime_FromTimeval(_PyTime_t *tp, struct timeval *tv);