This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: struct timeval is not declared
Type: compile error Stage: resolved
Components: Windows Versions: Python 3.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Mithil, iritkatriel, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2019-11-04 09:36 by Mithil, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg355932 - (view) Author: Mithil (Mithil) Date: 2019-11-04 09:36
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);
                                                           ^~~~~~~
pytime.h:130:12: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
     struct timeval *tv,
            ^~~~~~~
pytime.h:135:12: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
     struct timeval *tv,

=====

I think the reason for this is that the struct timeval isn't declared anywhere before the declaration of this function. For me on windows, the structure is defined inside of winsock.h and including it before the other python header files fixes the problem.
msg412101 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-29 20:02
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 so I am closing this. Please create a new issue, with more information, if you are seeing this problem on a current version (>= 3.9).
History
Date User Action Args
2022-04-11 14:59:22adminsetgithub: 82863
2022-01-29 20:02:00iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg412101

resolution: out of date
stage: resolved
2019-11-04 09:36:12Mithilcreate